Index

Symbols
+= (concatenation) operator, 736
#import directive, 501

attributes, 502-504
syntax, 502

+ (plus sign), 990
0 parameter value (ShutDown method), 861
1-bit images, 197
1 parameter value (ShutDown method), 861
2 parameter value (ShutDown method), 861
2D graphics. See also GUIs (graphical user interfaces)

Bézier curves, 183-184
bitmaps

BBTs (bit block transfers), 201-202
BITMAP1 sample application, 206-210
CBitmap class, 199-201
color depth, 197-198
DDBs (device-dependent bitmaps), 198-199
DIBs (device-independent bitmaps), 199
resources, 203-205

classes

CBitmap class, 199-201
CClientDC class, 155-156
CDC class, 153
CGdiObject class, 158-159
CPaintCD class, 154
CWindowDC class, 156-157

color depth, 197
DirectDraw, 1080

bitmaps, loading, 1103-1107
blits (bitmap block transfers), 1093-1096
clippers, 1100-1102
error handling, 1112-1114
initializing, 1083-1089
page flipping, 1097-1100
palettes, 1089-1093, 1107-1111
shutdown, 1114-1116
surfaces, 1093-1097
windowed rendering, 1111-1112

drawing tools, 158-159
ellipses, 180-182
image lists, 107-108

creating, 109-110
methods, 108-109

lines

CDC class, 170-174
drawing, 170-172

objects, 148

declaring, 159
Windows drawing tools relationship, 158-159

polygons, 179-180
polylines, 172-174
raster images, 196-197
rectangles

CDC class, 176-177
CRect class, 174-176
drawing, 176-177
rounded, 176-177

regions, 177-179

Boolean operations, 179
clipping regions, 177
creating, 177-178
CRgn class, 163-164

vector images, 167

3D graphics, 1024-1025. See also GUIs (graphical user interfaces)

coordinate axes, 1029
coordinate space, 1028
coplanar polygons, 1030
dialogs, 254
Direct3D, 1080
matrices, 1030
OpenGL, 1032-1033

applications, 1042
blending, 1073
datatypes, 1033-1034
development history, 1024-1025
display lists, 1060-1064
DLLs (dynamic link libraries), 1054-1055
downloading, 1025
fog effects, 1074-1075
function naming conventions, 1034-1036
light, 1064-1068
material properties, 1068-1069
matrix stack, 1037-1038
models, 1055-1057
render function scoping, 1036-1037
rendering, 1038-1041, 1053-1054
rotation, 1058-1059
scaling, 1059-1060
texture mapping, 1069-1072
translation, 1030, 1058
views, 1043-1053

polyons

coplanar, 1030
decals, 1026
wireframe, 1026

terminology, 1025-1028
vectors

cross-product calculations, 1031-1032
defined, 1029
normalizing, 1030-1031
resultant, 1029
unit, 1029
vertices, 1029

4-bit images, 197
16-bit images, 197
24-bit images, 197
200 status code value (HTTP), 915
332 palette, 1090-1091
400 status code value (HTTP), 915
404 status code value (HTTP), 915
405 status code value (HTTP), 915
500 status code value (HTTP), 915
503 status code value (HTTP), 915

A
Abort method, 694-695, 900
aborting. See stopping
About You page (WIZARD1.EXE application)

CPage1 class, 1212-1214
methods

DoDataExchange, 1214
OnWizardNext, 1214-1216

SAMPLEWIZDATA structure, 1216-1217
template, 1207

Accept method, 858-859
accessDenied value (CFileException::m_cause), 801
accessing

ambient properties, 532
automation servers, 471-472
type libraries, 433

accessors

CAccessor class, 695
CAccessorBase class, 695
CDynamicAccessor class

GetColumnCount method, 696
GetColumnName method, 696
GetColumnType method, 696-697
GetLength method, 696
GetParam method, 699-700
GetParamCount method, 699
GetParamName method, 699
GetParamType method, 699
GetStatus method, 698
GetValue method, 697-698
SetParam method, 699-700
SetStatus method, 698-699
SetValue method, 697-698

CManualAccessor class

AddBindEntry method, 700-701
AddParameterEntry method, 700-701
CreateAccessor method, 700
CreateParameterAccessor method, 700

ACS_AUTOPLAY style (animation control), 133
ACS_CENTER style (animation control), 133
ACS_TRANSPARENT style (animation control), 133
ActivateMe method, 569
activation security, 404
active document containers, 562-563

creating, 570-571
defined, 562
document extensions

IContinueCallback interface, 569
IOleCommandTarget interface, 569
IOleDocumentSite interface, 568

in-place activation

IOleInPlaceFrame interface, 568
IOleInPlaceSite interface, 567-568

site objects

IAdviseSink interface, 567
IOleClientSite interface, 566

storage

IPersistStorage interface, 565-566
IStorage interface, 563-564
IStream interface, 565

active document servers

CDocObjectServerItem class, 458-459
COleDocIPFrameWnd class, 459-462
OLE servers comparison, 451-452
persistence, 462-463
registration, 462
views, editing, 463-465

active documents

CDocObjectServer class, 434
CDocObjectServerItem class, 435
COleDocObjectItem class, 435
defined, 434

Active Template Library. See ATL
ActiveConnection property

ADOCommand class, 724
ADORecordset class, 721

ActiveX controls. See controls
ActiveX Data Objects. See ADO
ActiveX scripting, 626-627

binding

early, 634
late, 634-635

events, 649-651
interfaces, 627-628

dispinterfaces (dispatch interfaces), 635
dual, 634
IActiveScript, 628, 633
IActiveScriptParse, 628, 633
IActiveScriptSite, 628-632
IActiveScriptSiteWindow, 628-632
properties, 636-637

licensing, 629
object implementation

ATL (Active Template Library) object creation, 641-644
initialization, 646-649
scriptable object requirements, 644-645

object models

defined, 637
designing, 638
example, 639-641

script management, 651

ActualSize property (ADOField class), 724
Add Event dialog, 545
Add method, 108
AddBar method, 318
AddBindEntry method, 700-701
AddDocTemplate method, 31, 279
AddDocument method, 279
AddHead method, 747
AddNew method, 674, 720
AddPage method, 328, 340, 1200
AddParameterEntry method, 700-701
AddRef method, 382, 648
AddRequestHeaders method, 913
addresses

IP (Internet Protocol) address control, 65
module load addresses, 1195-1197
TAPI (Telephony API), 1002
translation, 990-991

AddTail method, 747
AddToRecentFileList method, 32
AddView method, 45-46
AdjustRect method, 127
ADO (ActiveX Data Objects), 686

ADOCommand class

collections, 724
methods, 722-723
properties, 721-724

ADOConnection class

collections, 717
methods, 714-716
properties, 715-717

ADOError class, 726-727
ADOField class, 724-725
ADOParameter class, 726
ADOProperty class, 725
ADORecordset class, 718

collections, 721
method, 718-720
properties, 719-721

CADORecordingBinding class, 708
data binding, 708-709
datatypes, 722-723
initializing, 709-712
interfaces, 708-712
OLE DB comparison, 687
records

adding, 713
deleting, 714
editing, 713
searching, 712

source file code example, 714

ADOCommand class

collections

Parameters, 722
Properties, 724

properties

ActiveConnection, 724
CommandText, 721
CommandTimeout, 722
CommandType, 721
Prepared, 724

methods

CreateParameter, 722-723
Execute, 722

ADOConnection class, 714

collections, 717
methods

BeginTrans, 716
Close, 714-715
CommitTrans, 716
Execute, 716-717
Open, 714-715
RollbackTrans, 716

properties

CommandTimeout, 717
ConnectionString, 715
ConnectionTimeout, 715
DefaultDatabase, 715
IsolationLevel, 716
Mode, 715
Provider, 715

ADOError class, 726-727
ADOField class, 724-725
ADOParameter class, 726
ADOProperty class, 725
ADORecordset class

collections, 721
methods

AddNew, 720
Close, 718
Delete, 720
MoveFirst, 719-720
MoveLast, 719-720
MoveNext, 719-720
MovePrevious, 719-720
Open, 718-719
Update, 720

properties

ActiveConnection, 721
BOF, 719
CacheSize, 720
EOF, 719
Source, 719

Advanced Options dialog, 455
affordance, 214
AFX (Application Frameworks), 8
AFX DLLs (dynamic link libraries)

advantages, 1180

code elimination, 1180-1181
creating, 1181-1182
extensibility, 1181
modularity, 1181

designing, 1192-1193
exports, 1182

by name, 1183
by ordinal, 1183
classes, 1185
data members, 1187
destructors, 1189-1190
explicit functions, 1186-1187
guidelines, 1191-1192
identifiers, 1182
include files, 1190-1191
MFC-generated data, 1187-1189
name mangling, 1183-1185
preprocessor directives, 1185-1186

loading/unloading

AfxFreeLibrary function, 1192
AfxLoadLibrary function, 1192
load addresses, 1195-1197

multiple module definition files, 1194-1195
resource location, 1193-1194

AfxBeginThread function, 25-26
AfxComparePath function, 765
AfxConnectionAdvise function, 414-416
AfxConnectionUnadvise function, 416-417
AfxEnableControlContainer function, 414
AFXEndThread function, 25
AfxFindResourceHandle function, 1193-1194
AfxFreeLibrary function, 1192
AfxFullPath function, 765
AfxGetApp function, 29, 242
AfxGetAppName function, 29
AfxGetFileName function, 980
AfxGetFileTitle function, 765
AfxGetInstanceHandle function, 29
AfxGetMainWnd function, 35
AfxGetResourceHandle function, 29
AfxGetRoot function, 765
AfxInitRichEdit function, 257
AfxLoadLibrary function, 1192
AfxLoadString function, 1193
AfxOleCanExitApp function, 410
AfxOleGetMessageFilter function, 411
AfxOleGetUserCtrl function, 411-412
AfxOleInit function, 257, 418-419
AfxOleInitModule function, 419
AfxOleLockApp function, 412
AfxOleLockControl function, 414
AfxOleRegisterControlClass function, 417
AfxOleRegisterPropertyPage-Class function, 417
AfxOleRegisterServerClass function, 413
AfxOleRegisterTypeLib function, 417
AfxOleSetEditMenu function, 413-414
AfxOleSetUserCtrl function, 412
AfxOleTypeMatchGuid function, 420
AfxOleUnlockApp function, 413
AfxOleUnlockControl function, 414
AfxOleUnregisterClass function, 417
AfxOleUnregisterTypeLib function, 418
AfxParseURL function, 911-912
AfxParseURLEx function, 913
AfxPostQuitMessage function, 26
AfxRegisterClass function, 35
AfxRegisterWndClass function, 35
AfxResolveShortCut function, 765
AfxSetResourceHandle function, 29
AfxSocketInit function, 855
AfxThrowArchiveException function, 800
AfxThrowDaoException function, 807
AfxThrowDbException function, 805
AfxThrowFileException function, 801-802
AfxThrowInternetException function, 808
AfxThrowMemoryException function, 799
AfxThrowNotSupportedException function, 799
AfxThrowOleDispatchException function, 418, 805
AfxThrowOleException function, 418, 803
AfxThrowResourceException function, 802
AfxThrowUserException function, 806
AfxVerifyLicFile function, 420
AfxWinMain function, 11
AFX_EXTENSION_MODULE structure, 1182
AFX_IDW_DOCKBAR_BOTTOM constant (DockControlBar method), 319
AFX_IDW_DOCKBAR_LEFT constant (DockControlBar method), 319
AFX_IDW_DOCKBAR_RIGHT constant (DockControlBar method), 319
AFX_IDW_DOCKBAR_TOP constant (DockControlBar method), 319
aggregation, 386
All collection (DTML), 840
allocating

BSTRs, 595-596
OpenGL display lists, 1064
strings, 734-736

AllocBuffer method, 734
ambient light, 1027, 1066-1067
ambient properties, 531-532

accessing, 532
dynamic state, 532-533

anchors, retrieving, 846-848
animation

animation control, 64, 131-132

creating, 134
implementing, 135
methods, 134
notification messages, 133
window styles, 133

double buffering, 1025
tearing, 1097

APIs. See names of specific APIs
Appearance property, 531
Append method, 683
AppendMenu method, 311-312
Application Frameworks (AFX), 8
application object (text editor), 639-640
application-specific initialization

3D dialog support, 254
automation support, 253-254, 257
command-line handling, 257-259
container support, 254
dialog applications, 250-251
document template classes, 255-256
main frame window creation, 256
MDI (multiple document interface) applications, 251-252
Registry usage, 254
rich edit control support, 257
SDI (single document interface) applications, 251

applications. See also databases; names of specific applications

creating, 50-53
CWinApp class, 29

accessing, 242-243
application lifetime, 243
application-specific initialization, 250-257
command-line parsing, 33
data members, 245-249
document support, 31-32
methods, 249
registry support, 30-31

dialog-based applications, 52 See also controls

CSockDlg example, 869-882
DDX (Dialog Data Exchange), 72-74, 424-425
idle processing, 268-270
initialization, 66-67, 250-251
MSIE (Internet Explorer) control, 827-828
standard dialog boxes, 74-77

graphical user interfaces, see GUIs
idle processing

dialog-based applications, 268-270
OnIdle method, 266-268

install/uninstall programs, 1177
MDI (Multiple Document Interface) applications, 52, 277, 295-296

data management, 298-299
document templates, 296-298
initialization, 251-252

SDI (Single Document Interface) applications, 52, 277. See also MFCServer application

CSingleDocTemplate class, 278-279
initialization, 251
views, changing, 291-295

splash screens, 270-271
views

class view, 55-56
file view, 54-55
resource view, 56-57

AppWizard, 309-310

automation, 476-477
dialog boxes

Advanced Options, 455
MFC AppWizard—Step 1, 51
MFC AppWizard—Step 2 of 4, 52
MFC AppWizard—Step 3 of 4, 53
MFC AppWizard—Step 4 of 4, 53

document servers, 450-452

active document servers, 451-452, 462
container-servers, 452
creating, 452
full servers, 451
mini-servers, 452
registration, 455

starting, 50
Support MFC option, 522

architecture, document/view, 276-277

CWinApp class methods

AddDocTemplate, 31
AddToRecentFileList, 32
EnableShellOpen, 32
GetFirstDocTemplatePosition, 31
GetNextDocTemplate, 31
LoadStdProfileSettings, 32
OpenDocumentFile, 32
RegisterShellFileTypes, 32
UnregisterShellFileTypes, 32

documents

creating, 280-282
opening new files, 282-284
single versus multiple, 284-285
templates, 278-280

MDI (Multiple Document Interface) applications, 52, 277, 295-296

data management, 298-299
document templates, 296-298
initialization, 251-252

SDI (Single Document Interface) applications, 52, 277. See also MFCServer application

CSingleDocTemplate class, 278-279
initialization, 251
views, changing, 291-295

servers, 453-454
views

adding, 292
CDaoRecordView class, 287
CEditView class, 288
CFormView class, 287
changing, 291-295
CListView class, 288
CRecordView class, 287
CRichEditView class, 288
CScrollView class, 286
CTreeView class, 287
CView class, 285
frame classes, 292-293
UNL_Single sample application, 288-291

arrays

collections

CByteArray class, 742-744
memory allocation, 744-746

SAFEARRAYs, 405-406

AssertValid method, 14
Assisted Telephony

functions

TapiGetLocationInfo, 989
TapiRequestMakeCall, 989, 1000-1001

phone dialer application, 999-1001

asynchronous monikers, 442
AsyncSelect method, 863-864
ATL (Active Template Library), 590. See also MFCServer application

ambient properties, 532
CComBSTR class, 594-597
CComVariant class, 603-604
consumer classes, 687
controls

adding events, 555-556
adding methods, 554
adding properties, 554
creating, 553-559
defining interfaces, 557
developing, 521-522
MFC comparison, 523-528
MFC compatibility, 522-523
templates, 522, 557-558

conversion macros, 597-599
events, 534-535
Object Wizard, 606-610
objects, creating, 641-644
smart pointer templates, 591-593

atlbase.h file, 593
CComPtr class, 592
CComQIPtr class, 592-593

ATL COM AppWizard, 523
ATL Object Wizard

controls, creating, 554
dialog boxes, 687-689
OLE DB consumers, 687-690
property pages, 536
Select Database Table dialog, 689

Attach method, 37, 108
Attributes property

ADOField class, 725
ADOProperty class, 725

audio files. See sound files
AUTMGR32 (Automation Manager), 516-517
automation, 388-391, 435, 491

CCmdTarget class

EnableAutomation method, 23-24
FromIDispatch method, 24
GetIDispatch method, 24
IsResultExpected method, 24
OnFinalRelease method, 24

controllers, 393, 466, 491, 496

COleDispatchDriver class, 492-493, 496-498
creating, 492

early binding, 388
features, 465
interfaces

adding, 480-481
dispinterfaces, 392, 490
IDispatch, 391-392, 466-471, 486
IDL (Interface Definition Language), 466, 487-489
ITypeInfo, 389
ITypeLib, 389
ODL (Object Definition Language), 466, 489-490

late binding, 389
New Class dialog, 480
objects, 393
remote, 512-513

Automation Manager, 516-517
Remote Automation Connection Manager, 514-516
server registration, 513

support for, 253-254, 257
Variant datatype, 473-476

Automation Manager, 516-517
automation servers, 393, 466

Autoserv application

executing, 509-512
interface definition, 498-499
method implementation, 499-501
TLH file, 504-507
TLI file, 508-509

connecting to

CreateDispatch method, 493
DISPIDs (dispatch IDs), 495
method invocation, 495
pointers, 494-495

DLLs (dynamic link libararies), 476
executable, 476
IDispatch interfaces, 471-472
#import directive, 501-504
methods, 478-483
placeholders, 477-478
properties, 478-483

Autoserv application

executing, 509-512
interface definition, 498-499
method implementation, 499-501
TLH file

footer boilerplate, 508
forward references/typedefs, 505
header boilerplate, 504-505
implementation, 508
smart pointer declarations, 505-506
Typeinfo declarations, 506-507

TLI file, 508-509

AuxUserType subkey (COM objects), 540
B
back buffers, 1094
BackColor property, 531
background erasure (OpenGL), 1051
badClass value (CArchiveException::m_cause), 800
badIndex value (CArchiveException::m_cause), 800
badPath value (CFileException::m_cause), 801
badSchema value (CArchiveException::m_cause), 800
badSeek value (CFileException::m_cause), 801
/Base directive, 1196
Basic Telephony Services

address translation, 990-991
addresses, 1002
calls

dropping, 991, 1018
handles, 993
placing, 991, 1012-1016
states, 991-992

configuring

CreateIoCompletionPort method, 1005
LINEDEVCAPS structure, 1009-1011
lineGetDevCaps method, 1007-1009
lineInitialize method, 1003-1004
lineInitializeEx method, 1004-1005
lineNegotiateAPIVersion method, 1005-1007
lineOpen method, 1011-1012

connecting with

callback procedure, 1015-1016
lineMakeCall method, 1012-1013
lineTranslateAddress method, 1014

data transmission

lineGetID method, 1016-1017
modem handles, 1017-1018

disconnecting, 1018
lines, 1002-1005
terminating sessions, 1018-1019

BBTs (bit block transfers)

BitBlt method, 201-202
StretchBlt method, 202

BeforeNavigate2 event, 823
begin actions (transactions), 659
BeginDrag method, 108
BeginModalState method, 43
BeginTrans method, 668, 679, 716
BeginWaitCursor method, 22
BEGIN_CONNECTION_MAP macro, 431
BEGIN_CONNECTION_PART macro, 430
BEGIN_DISPATCH_MAP macro, 426
BEGIN_EVENTSINK_MAP macro, 429
BEGIN_EVENT_MAP macro, 428
BEGIN_MESSAGE_MAP macro, 22, 264
BEGIN_OLEFACTORY macro, 421
BEGIN_PARSE_MAP macro, 942
BEGIN_PROPPAGEIDS macro, 433
Bézier curves, 183-184
binding

early, 388, 634
late, 389, 634-635

bit block transfers. See BBTs
BitBlt method, 201-202
bitmap methods (CDC class), 152
BITMAP structure, 198-199
BITMAP1 application (bitmap resources), 206-207

CMainWnd class, 207
methods

BlitBitmap, 208-209
PositionRects, 208
PtInRect, 210

bitmaps, 148, 197

BBTs (bit block transfers)

BitBlt method, 201-202
StretchBlt method, 202

BITMAP1 sample application, 206-207

CMainWnd class, 207
methods, 208-210

CBitmap class, 163, 199-201
color depth, 197-198
copying into DirectDraw surfaces, 1106-1107
DDBs (device-dependent bitmaps)

BITMAP structure, 198-199
discardable, 198
nondiscardable, 198

DIBs (device-independent bitmaps), 199, 1070-1071
loading into DirectDraw surfaces, 1103-1105
resources

adding to executable files, 203-204
retrieving from executable files, 204-205

BLACKNESS raster operation, 196
blending, 1073
blind-reving (blind revisioning), 1192
BlitBitmap method, 208
blits (bitmap block transfers)

Blt method, 1095-1096
defined, 1093

Blt method, 1095-1096, 1111
bMask parameter (CImageList control), 110
bmBits data member (BITMAP structure), 199
bmBitsPixel data member (BITMAP structure), 199
bmHeight data member (BITMAP structure), 199
bmPlanes data member (BITMAP structure), 199
bmType data member (BITMAP structure), 199
bmWidth data member (BITMAP structure), 199
bmWidthBytes data member (BITMAP structure), 199
<body> tag (HTML), 832
BOF property (ADORecordset class), 719
Borderstyle property, 531
BottomRight method, 174
browsers. See Internet Explorer
brushes, 162
BSTRs, 405

allocating/deallocating, 595-596
_bstr_t class, 597
CComBSTR templates, 595-597
defined, 594

buddy windows, 88
buffers, 1143
BuildSharedMenu method, 461-462
button control, 60
buttons

button control, 60
radio button control, 61
wizard buttons, 1203-1204

C
C++ exceptions, 792

CException class, 795-797
example, 793-794
syntax, 793
throwing, 794-795

CAboutDlg class, 56
CAccessor class, 695
CAccessorBase class, 695
CAccessorRowset class, 706
CacheSize property (ADORecordset class), 720
CADORecordingBinding class, 708
CalcNumPages method, 363
CalculatePoints method, 753
calendars, 65
call security, 404
calls (TAPI)

call handles, 993
dropping, 991, 1018
phone dialer application, 999-1001
placing, 991, 1012-1016
states, 991-992

CancelBlockingCall method, 868
CancelToClose method, 1201
CancelToolTips method, 71
CancelUpdate method, 677
CanCloseFrame method, 47
CAnimateCtrl class, 131-132

implementing, 135
initializing, 134
methods, 134
notification messages, 133
window styles, 133

CanInPlaceActivate method, 567
canonical addresses, 990
CanPaste method, 144
CanTransact method, 667
CanUndo method, 143
Caption property, 531
CArchiveException class, 799-800
CArrayRowset class, 705
CAsynchMonikerFile class, 442
CAsyncSocket class, 855, 874-876
CBitmap class, 163, 199-201
CBookRecordset class

class definition, 671
constructor, 672
methods, 672-673

CBooks class, 691-692
CBooksAccessor class, 690
CBRS_FLYBY style (toolbars), 323
CBRS_SIZE_DYNAMIC style (toolbars), 324
CBrush class, 161-162
CBulkRowset class, 705
CByteArray class

definition, 742-744
memory allocation, 744-746

CCachedDataPathProperty class, 442
CClientDC class, 155-156
CClockCtrl (clock control), 217

class definition, 218
face-painting routine, 220-221
hand-painting routine, 221-224

NOT XOR raster operation, 223
vertices, 221

metrics

ComputeFacePoint method, 219-220
RecalcLayout method, 219

time display, 224

CCmdTarget class, 435

automation support

EnableAutomation method, 23-24
FromIDispatch method, 24
GetIDispatch method, 24
IsResultExpected method, 24
OnFinalRelease method, 24

message routing, 19

message maps, 20-22
OnCmdMsg, 22

mouse pointer state, changing, 22

CCmdUI class, 325
CColorDialog class, 75
CComBSTR class, 594-597
CCommand class, 706-707
CComPtr class, 592
CComQIPtr class, 592-593
CComVariant class, 603-604
CConnectionPoint class, 436
CControlBar class, 315. See also control bars
CControlProxyView class, 580
CCS_BOTTOM style (list view control), 113
CCS_NODIVIDER style (list view control), 113
CCS_NOHILITE style (list view control), 113
CCS_NOMOVEY style (list view control), 113
CCS_NOPARENTALIGN style (list view control), 113
CCS_NORESIZE style (list view control), 113
CCS_TOP style (list view control), 113
CDaoDatabase class, 679-680
CDaoException class, 806-807
CDaoQueryDef class, 682-684
CDaoRecordset class, 680
CDaoRecordView class, 287
CDaoTableDef class, 681-682
CDaoWorkspace class, 678-679
CDatabase class, 666-668
CDataPathProperty class, 442
CDataSource class, 692-693
CDbException class, 803-805
CDC class, 151-153, 170-171, 179-184
CDialog class, 261
CDialogBar class, 316
CDocItem class, 444-446, 456
CDocManager class, 281-282
CDocObjectServer class, 434
CDocObjectServerItem class, 435

active document servers, 458-459
methods, 458

CDocument class, 975-976

message routing, 261
methods

AddView, 45-46
CanCloseFrame, 47
DeleteContents, 46
GetDocTemplate, 45
GetFile, 47
GetFirstViewPosition, 46
GetNextView, 46
GetPathName, 45
GetTitle, 45
IsModified, 45
OnCloseDocument, 47
OnFileSendMail, 976-981
OnNewDocument, 47
OnOpenDocument, 47
OnSaveDocument, 47
OnUpdateFileSendMail, 976
PreCloseFrame, 47
ReleaseFile, 47
RemoveView, 45
ReportSaveLoadException, 47
SaveModified, 45
SetModifiedFlag, 45
SetPathName, 45
SetTitle, 45

CDynamicAccessor class, 696-699
CDynLinkLibrary class, 1182
CEditView class, 288
CenterPoint method, 174
CenterWindow method, 39
CException class, 795-798
CFile class, 758-759

CFileStatus structure, 761
declaration, 761-764
file modes, 759-760
methods, 760
Windows API function map, 764-765

CFileDialog class, 74

modal implementation, 770-771
OPENFILENAME structure, 771-772
user-defined, 772-773

CFileException class

data members

m_cause, 800-801
m_IosError, 801
m_strFileName, 800

methods

constructor, 801
ErrnoToException, 802
OSErrorToException, 802
ThrowErrno, 802
ThrowOsError, 802

CFileFind class

file attributes, 919-920
file operations, 918-919

CFileStatus structure, 761
CFont class, 162-163, 190-192
CFontDialog class, 75
CFontHolder class, 442
CFormView class, 287
CFrameWnd class

message routing, 261
methods

BeginModalState, 43
EndModalState, 43
GetActiveDocument, 42
GetActiveFrame, 42
GetActiveView, 42
GetTitle, 42
InModalState, 43
SetActiveView, 42
SetMessageText, 42
SetTitle, 42

CFtpConnection class, 916-917
CFtpFileFind class, 920-921
CGdiObject class, 158-159
CGLView class, 1043. See also views
CGopherConnection class, 922
CGopherFile class, 924
CGopherFindFile class, 924
CGopherLocator class, 922-923
changing

mouse pointer state, 22
views, 291-295

document updates, 295
frame classes, 292-293
resource definitions, 295
SwitchViews method, 293-295

CHARFORMAT structure, 138-139
check box control, 60
CHotKeyCtrl class

creating, 86
default values, 86-87
global hot keys, 87
methods, 85-86
thread-specific hot keys, 87

CHtmlView class, 824-825

COM (component object model), relationship with, 827
document/view relationship, 825-827
methods

GetHtmlDocument, 824
OnFileOpen, 826

CHttpConnection class

AfxParseURL protocol types, 911-913
command parameter values, 910-911
OpenRequest options, 911

CHttpFile class, 913-914
CHttpServer object, 955
CHyperlink control, 225-227

cursor, controlling, 231-232
font processing, 228-229
implementation strategy, 227-228
keyboard input, 234-236
links, launching, 236-237
mouse input, 232-234
painting routines

DrawFocusRect method, 229-230
DrawText method, 229

CImageList class, 107-108

initializing, 109-110
methods, 108-109

CInternetConnection class, 901-902
CInternetException class, 807-808, 901
CInternetFile class, 899-901
CInternetSession class

instantiating, 890-891
methods

EnableStatusCallback, 897
GetContext, 899
GetCookie, 896-897
GetFtpConnection, 895
GetGopherConnection, 895
GetHttpConnection, 893-894
OpenURL, 892-893
ServiceTypeFromHandle, 899
SetCookie, 895

CIntroPage class, 1210
CInvestmentWiz class, 339-340
CInvestWizData class, 333
CInvestWizPage1 class, 334-335
CInvestWizPage2 class, 336-337
CInvestWizPage3 class, 337-338
class view, 55-56
classes, 214

ADOCommand class

collections, 724
methods, 722-723
properties, 721-724

ADOConnection class

collections, 717
methods, 714-716
properties, 715-717

ADOError class, 726-727
ADOField class, 724-725
ADOParameter class, 726
ADOProperty class, 725
ADORecordset class

collections, 721
method, 718-720
properties, 719-721

ATL consumer classes, 687
CAboutDlg, 56
CAccessor, 695
CAccessorBase, 695
CAccessorRowset, 706
CADORecordBinding, 708
CAnimateCtrl, 131-132

implementing, 135
initializing, 134
methods, 134
notification messages, 133
window styles, 133

CArchiveException, 799-800
CArrayRowset, 705
CAsynchMonikerFile, 442
CAsynchSocket, 855, 874-876
CBitmap, 163, 199-201
CBookRecordset

class definition, 671
constructor, 672
methods, 672-673

CBooks, 691-692
CBooksAccessor, 690
CBrush, 161-162
CBulkRowset, 705
CByteArray

definition, 742-744
memory allocation, 744-746

CCachedDataPathProperty, 442
CClientDC, 155-156
CCmdTarget, 435

automation support, 23-24
message routing, 19-22
mouse pointer state, changing, 22

CCmdUI, 325
CColorDialog, 75
CComBSTR, 594-597
CCommand, 706-707
CComPtr, 592
CComVariant, 603-604
CConnectionPoint, 436
CControlBar, 315
CControlProxyView, 580
CDaoDatabase, 679-680
CDaoException, 806-807
CDaoQueryDef, 682-684
CDaoRecordset, 680
CDaoRecordView, 287
CDaoTableDef, 681-682
CDaoWorkspace, 678-679
CDatabase, 666-668
CDataPathProperty, 442
CDataSource, 692-693
CDbException, 803-805
CDC, 151-153, 170-171, 180-182
CDialog, 261
CDialogBar, 316
CDocItem, 444-446, 456
CDocManager, 281-282
CDocObjectServer, 434
CDocObjectServerItem, 435

active document servers, 458-459
methods, 458

CDocument, 975-976

message routing, 261
methods, 976-981

CDynamicAccessor, 696-699
CDynLinkLibrary, 1182
CEditView, 288
CException, 795-798
CFile, 758-759

CFileStatus structure, 761
declaration, 761-764
file modes, 759-760
methods, 760
Windows API function map, 764-765

CFileDialog, 74, 770

modal implementation, 770-771
OPENFILENAME structure, 771-772
user-defined, 772-773

CFileException

data members, 800-801
methods, 801-802

CFileFind

file attributes, 919-920
file operations, 918-919

CFont, 162-163, 192
CFontDialog, 75
CFontHolder, 442
CFormView, 287
CFrameWnd

message routing, 261
methods, 42-43

CFtpConnection, 916-917
CFtpFileFind, 920-921
CGdiObject, 158-159
CGLView, 1043
CGopherConnection, 922
CGopherFile, 924
CGopherFindFile, 924
CGopherLocator, 922-923
CHotKeyCtrl

creating, 86
default values, 86-87
global hot keys, 87
methods, 85-86
thread-specific hot keys, 87

CHtmlView, 824-825

COM (component object model), relationship with, 827
document/view relationship, 825-827
methods, 824-826

CHttpConnection

AfxParseURL protocol types, 911-913
command parameter values, 910-911
OpenRequest options, 911

CHttpFile, 913-914
CImageList, 107-108

initializing, 109-110
methods, 108-109

CInternetConnection, 901-902
CInternetException, 807-808, 901
CInternetFile, 899-901
CInternetSession

instantiating, 890-891
methods, 892-895

CIntroPage, 1210
CInvestmentWiz, 339-340
CInvestWizData, 333
CInvestWizPage1, 334-335
CInvestWizPage2, 336-337
CInvestWizPage3, 337-338
CListCtrl

adding items to, 119
image lists, 113-114
implementing, 117-118
initializing, 116-117
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

CListView, 288
CManualAccessor, 700-701
CMediaPlayer, 1121-1122
CMemFile class, 768-769
CMemoryException, 799
CMenu, 310-314
CMonikerFile, 442
CMultiDocTemplate, 255-256
CMyInternetSession, 903-904
CNotSupportedException, 799
CObject, 14

diagnostic support, 14-15
RTTI (Runtime Type Information), 15-16
serialization, 17-19

COleBusyDialog, 437
COleChangeIconDialog, 437
COleChangeSourceDialog, 437
COleClientItem, 440, 456
COleCmdUI, 442
COleControl, 442, 543
COleControlModule, 443
COleConvertDialog, 437
COleCurrency, 447
COleDataObject, 444
COleDataSource, 444
COleDateTime, 447
COleDateTimeSpan, 448
COleDBRecordView, 448
COleDialog, 438
COleDispatchDriver, 436, 492-493, 496-498
COleDispatchException, 436, 805-806
COleDocIPFrameWnd

active document servers, 459-462
class declaration, 459-460
methods, 460-462

COleDocItem, 440
COleDocObjectItem, 435
COleDocument, 441
COleDropSource, 444
COleDropTarget, 444
COleException, 447, 803
COleInsertDialog, 438
COleIPFrameWnd, 446
COleLinkingDoc, 441
COleLinksDialog, 438
COleMessageFilter, 446
COleObjectFactory, 447
COlePasteSpecialDialog, 438
COlePropertiesDialog, 438-439
COlePropertyPage, 443
COleResizeBar, 446
COleServerDoc, 446
COleServerItem, 446
COleStreamFile, 447
COleTemplateServer, 446
COleUpdateDialog, 439
CPage1, 1212-1214
CPage2, 1218
CPage3, 1217
CPaintDC, 153-154
CPalette, 163
CPen, 160-161, 160, 170
CPictureHolder, 443
CPoint, 169-170
CPrintDialog, 76
CProgressCtrl

initializing, 106
methods, 105-106
range/current position, 106-107

CPropertyPage, 329, 1201-1202
CPropertySheet, 327-329, 1200-1201
CPropExchange, 443
CQIComPtr, 592-593
CReBar, 315
CRecordset

derived classes, 668-673
methods, 674-677

CRecordView, 287
CRect, 174-175
CRectTracker, 447
CResourceException, 802
CRgn, 163-164
CRichEditCntrItem, 441
CRichEditCtrl, 135-137

CHARFORMAT structure, 138-139
methods, 142-145
implementing, 145-146
initializing, 145
PARAFORMAT structure, 139-141
window styles, 137

CRichEditDoc, 441
CRichEditView, 288
CRowset, 701-704
CRuntimeClass, 280
CScrollView, 286
CSession, 693-695
CSharedFile class, 769-770
CSingleDocTemplate, 255-256, 278-279
CSliderCtrl, 95

initializing, 100
messages, 96-98
methods, 98-100
SLIDER1 sample application, 100-104
window styles, 95-96

CSpinButtonCtrl

buddy windows, 88
initializing, 91
messages, 90
methods, 90-91
SPIN1 sample application, 91-94
window styles, 89

CSplashWnd, 270
CSplitterWnd, 340-342
CStatusBar, 315
CStdioFile

methods, 765-767
MFC_CSTR_KLUDGE macro, 767-768

CString

allocating strings, 734-736
comparing strings, 738
concatenating strings, 736
CStringData structure, 733-735
data members, 732-733
declaration, 733
methods, 734, 737-738
searching strings, 737-738
SplitPartsString utility, 738-741

CTabCtrl

adding tabs, 130
initializing, 129
message handlers, 130-131
methods, 127-128
notification messages, 126-127
TC_ITEM structure, 128-129
window styles, 125-126

CTable, 707-708
CTapi, 1002
CToolBar, 315
CTreeCtrl

implementing, 124
initializing, 123
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

CTreeView, 287
CUserException, 806
CView, 285

message routing, 261
methods, 43-44, 347-349

CWave, 1134-1140

Wave.cpp source code file, 1135-1139
Wave.h header file, 1134-1135

CWinApp, 29

accessing, 242-243
application lifetime, 243
application-specific initialization, 250-259
command-line parsing, 33
data members, 245-249
document support, 31
methods, 31-32, 249
registry support, 30-31

CWindowDC, 156-157
CWinThread, 24

methods, 26-28, 244-245
user interface threads, 25-26
worker threads, 25

CWnd, 34

container support, 572-573
methods, 36-40
registering, 35

CXEvent, 749-753
CXEventRecorder, 749-753
CXParticipant, 749-753
defined, 376
device contexts class hierarchy, 150-151
exporting, 1185
inheritance hierarchy, 13
subclasses, 214-215, 225, 237-239
superclasses, 214
wrapper classes, 34-35

ClassView tab (Visual Studio), 55-56
ClassWizard

automation servers

adding methods, 478-483
adding properties, 478-483
placeholders, 477-478

property pages, 537

CleanupDirectSound method, 1147
Clear method, 142
ClearSel method, 100
ClearTics method, 100
clients, 377, 382-383. See also controllers

FTP (File Transfer Protocol) client application, 924

directory navigation, 930-931
file listings, 929-930
file retrieval, 931-932
initialization, 926-928
server connection, 928-929
shell, 924-926

MAPI (Messaging Application Programming Interface), 971

ClientToScreen method, 314
clippers (DirectDraw), 1100-1101

associating with frames/surfaces, 1101-1102
creating, 1101

clipping methods (CDC class), 152
clipping planes, 1026
clipping regions, 177
CListCtrl class

adding items to, 119
image lists, 113-114
implementing

columns, 117-118
image lists, attaching, 117

initializing, 116-117
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

CListView class, 288
clock control (static), 217

class definition, 218
face-painting routine, 220-221
hand-painting routine, 221-224

NOT XOR raster operation, 223
vertices, 221

metrics

ComputeFacePoint method, 219-220
RecalcLayout method, 219

time display, 224

Clone method, 565
Close method, 666-667, 760, 861, 899

ADOConnection class, 714-715
ADORecordset class, 718
CAccessorRowset class, 706
CDaoDatabase class, 679
CDaoQueryDef class, 683
CDaoTableDef class, 681
CDaoWorkspace class, 678
CDataSource class, 692
CRowset class, 704
CSession class, 693-694

closing

files, 899
requests, 914
socket connections, 861
TAPI (Telephony API)sessions, 1018-1019

club.htm form, 960

code listing, 958, 966
radio button, 961

CManualAccessor class, 700-701
CMC (Common Messaging Calls), 972-973
cmc_act_on function, 973
cmc_free function, 973
cmc_list function, 973
cmc_logoff function, 973
cmc_logon function, 973
cmc_look_up function, 973
cmc_query_configuration function, 973
cmc_read function, 973
cmc_send function, 972
cmc_send_documents function, 972
CMediaPlayer class, 1121-1122
CMembrAppExtension, 954

CHttpServer object, 955
debug mode, 955-956
form submission, 959
GET/POST request handling, 957-958
handler method, 960-961, 967-968
OnParseError override, 962-963
parse map, 960, 964-965
running with IIS (Internet Information Server), 956-957

CMemFile class class, 768-769
CMemoryException class, 799
CMenu class, 310-312. See also menus
CMonikerFile class, 442
CMultiDocTemplate class, 255-256
CMyExtension (ISAPI example). See also CMembrAppExtension

class declaration, 936-937
class implementation, 944-945
ClassWizard override declarations, 937
command handlers, 951-953
CWinApp declaration, 941
EXTENSION_CONTROL_BLOCK structure, 949-950
implementation file, 938-940
methods

GetExtensionVersion, 945
HttpExtensionProc, 945-951

object declaration, 944
parse map

code listing, 941
declaration, 938, 941-942
macros, 942-944

CMyInternetSession class, 903-904
CNotSupportedException class, 799
CObject class

diagnostic support

AssertValid method, 14
Dump method, 15

RTTI (Runtime Type Information), 15-16
serialization

exceptions, 18
explicit, 19
implicit, 19
IsSerializable method, 17
Serialize method, 18-19

CoCreateInstance method, 400-401, 621
CoCreateInstanceEx method, 401
code listings. See listings
CoGetClassObject method, 385
COleBusyDialog class, 437
COleChangeIconDialog class, 437
COleChangeSourceDialog class, 437
COleClientItem class, 440, 456
COleCmdUI class, 442
COleControl class, 442, 543
COleControlModule class, 443
COleConvertDialog class, 437
COleCurrency class, 447
COleDataObject class, 444
COleDataSource class, 444
COleDateTime class, 447
COleDateTimeSpan class, 448
COleDBRecordView class, 448
COleDialog class, 438
COleDispatchDriver class, 436, 492-493, 496-498
COleDispatchException class, 436, 805-806
COleDocIPFrameWnd class

active document servers, 459-462
class declaration, 459-460
methods

DestroySharedMenu, 462
GetInPlace, 460
OnRequestPositionChange, 460-461

COleDocItem class, 440
COleDocObjectItem class, 435
COleDocument class, 441
COleDropSource class, 444
COleDropTarget class, 444
COleException class, 447, 803
COleInsertDialog class, 438
COleIPFrameWnd class, 446
COleLinkingDoc class, 441
COleLinksDialog class, 438
COleMessageFilter class, 446
COleObjectFactory class, 447
COlePasteSpecialDialog class, 438
COlePropertiesDialog class, 438-439
COlePropertyPage class, 443
COleResizeBar class, 446
COleServerDoc class, 446
COleServerItem class, 446
COleStreamFile class, 447
COleTemplateServer class, 446
COleUpdateDialog class, 439
collections

defined, 741
DHTML (dynamic HTML), 838

All, 840
iterating through, 841-843

Errors, 717
Fields, 721
Parameters, 722
Properties

ADOCommand class, 724
ADOConnection class, 717
ADOField class, 725
ADORecordset class, 721

template classes, 742
types

array, 742-746
list, 746-747
map, 747-749
templated, 749

UNL_MultiEd application

classes, 749-753
participants, adding/removing, 753-754

color

blending, 1073
color depth, 197
DirectDraw palettes

332 palette, 1090-1091
creating, 1089-1091, 1107-1108
management support, 1091-1093
re-establishing, 1109-1111

OpenGL palettes 1051-1052
tracking, 1069

Color Selection dialog box, 75
columns, 657, 682
COM (Component Object Model), 374. See also classes; interfaces

aggregation, 386
automation, 388-391

controllers, 393
early binding, 388
interfaces, 391-392
late binding, 389
objects, 393
servers, 393

BSTRs, 405

allocating/deallocating, 595-596
_bstr_t class, 597
CComBSTR templates, 595-597
defined, 594

class factories, 376, 385
clients, 377, 382-383
connectable objects, 398-399
containment, 386
DCOM (Distributed COM), 399-400

method invocation, 402-404
object creation, 400-402
object initialization, 402
OBJREFS (object references), 404
security, 404-405

development history, 374-375
HRESULTs, 407
marshalling, 386-388

defined, 387
proxy/stub relationship, 387
standard marshalers, 388

monikers, 396-397
objects

defined, 376
subkeys, 539-540

persisting data, 393-394

IPersist interfaces, 395-396
structured storage, 394-395

real-world view, 377
recommended reading, 407-408
reference counting, 382
runtime environment, 384
SAFEARRAYs, 405-406
servers, 377, 382-383
terminology, 375-376
threading models, 389-390
UDT (Uniform Data Transfer), 397-398
VARIANTs, 407

CombineRgn method, 164, 178-179
combining exception types, 813-814
combo boxes

combo box control, 61
extended combo box control, 66

command messages, 262-263. See also messages
command update message handlers, 324-325
command-line, parsing, 33
commands (menu). See also functions; methods

Edit menu, Insert New Control, 551
File menu, New, 50
Insert menu

New ATL Object, 536, 687
New Class, 480

Print menu

identifiers, 351
message handlers, 351

CommandStateChange event, 823
CommandText property (ADOCommand class), 721
CommandTimeout property

ADOCommand class, 722
ADOConnection class, 717

CommandType property (ADOCommand class), 721
commit actions (transactions), 660
Commit method, 564-565, 694-695
CommitTrans method, 668, 679, 716
common controls, 62, 80

animation, 64, 131-132

creating, 134
implementing, 135
methods, 134
notification messages, 133
window styles, 133

date/time picker, 65
extended combo box, 66
hot key, 63

creating, 86
default values, 86-87
global hot keys, 87
methods, 85-86
thread-specific hot keys, 87

image lists, 107-108

creating, 109-110
methods, 108-109

initializing

InitCommonControls method, 80
InitCommonControlsEx method, 80-81

IP (Internet Protocol) address, 65
list, 63
list view, 110

adding items to, 119
creating, 116-117
image lists, 113-114
implementing, 117-118
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

month calendar, 65
notifications, 81

codes, 82
message structure, 82
ON_NOTIFY macro, 83-84
ON_NOTIFY_RANGE macro, 84-85
process, 82-83

progress bars

creating, 106
methods, 105-106
range/current position, 106-107

progress indicator, 62
rich edit, 64-65, 135-137

CHARFORMAT structure, 138-139
creating, 145
methods, 143-145
implementing, 145-146
PARAFORMAT structure, 139-141
window styles, 137

slider, 63, 95

creating, 100
messages, 96-98
methods, 98-100
resizing, 104
SLIDER1 sample application, 100-104
window styles, 95-96

spin, 62

buddy windows, 88
creating, 91
messages, 90
methods, 90-91
SPIN1 sample application, 91-94
window styles, 89

tab, 64, 125

adding tabs to, 130
creating, 129
message handlers, 130-131
methods, 127-128
notification messages, 126-127
TC_ITEM structure, 128-129
window styles, 125-126

tree view controls, 64

creating, 123
implementing, 124
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

Common Messaging Calls (CMC), 972-973
Compare method, 738
comparing strings, 738
Compiler Preferences page (WIZARD1.EXE application)

CPage2 class, 1218
template, 1207

component categories

controls, 528-529
ICatInformation interface, 529-530
ICatRegister interface, 529

Component Object Model. See COM
compound files, 394
ComputeFacePoint method, 219-220
concatenating strings, 736
concatenation operator (+=), 736
configuring TAPI (Telephony API), 1003

CreateIoCompletionPort method, 1005
LINEDEVCAPS structure, 1009-1011
lineGetDevCaps method, 1007-1009
lineInitialize method, 1003-1004
lineInitializeEx method, 1004-1005
lineNegotiateAPIVersion method, 1005-1007
lineOpen method, 1011-1012

Connect method, 858
connectable objects, 398-399
connection maps, 430-431
connection point management

AfxConnectionAdvise function, 414-416
AfxConnectionUnadvise function, 416-417
CConnectionPoint class, 436

connection strings, 693
connections (socket)

closing, 861
opening, 857-859

ConnectionString property (ADOConnection class), 715
ConnectionTimeout property (ADOConnection class), 715
CONNECTION_IID macro, 431
CONNECTION_PART macro, 431
ConnectTemplate method, 257
Construct method, 1200
consumer classes, 687
consumers. See clients
container-servers, 452
containers, 386

active document containers, 562-563

creating, 570-571
defined, 562
document extensions, 568-569
in-place activation, 567-568
site objects, 566-567
storage, 563-566

control containers, 571-572

adding to projects, 572
ControlDialog project, 581-587
ControlProxy project, 574-580
CWnd class, 572-573

support for, 254

ContinueModal method, 39
control bars, 314-316

CControlBar class, 315
dialog bars, 316
displaying/hiding, 321-322
docking, 319
rebars, 318
status bars, 319-321
toolbars

creating, 316-318
customizing, 318-319
initializing, 318
styles, 323

ToolTips, 323-324

control containers, 571-572

adding to projects, 572
ControlDialog project, 581-583

CMFCActiveX class, 584-585
event handlers, 585-586
methods, 586-587

ControlProxy project, 574-575

CControlProxyView class, 580
CMFCActiveX class definition, 576-577
incoming interfaces, 575-576
methods, 577-578
WM_CREATE message handler, 578

CWnd class, 572-573

Control subkey (COM objects), 539
control views, 287
ControlDialog project (control container), 581-583

CMFCActiveX class, 584-585
event handlers, 585-586
methods

SetAntenna, 586
SetWindowText, 587

controllers, 393, 491. See also clients

COleDispatchDriver class, 492-493, 496-498
creating, 492

ControlProxy project, 574-575

CControlProxyView class, 580
CMFCActiveX class, 576-577
incoming interfaces, 575-576
methods

GetProperty, 577
InvokeHelper, 578
SetProperty, 577

WM_CREATE message handler, 578

controls, 57-59, 80, 522-526. See also classes

animation, 64, 131-132

creating, 134
implementing, 135
methods, 134
notification messages, 133
window styles, 133

ATL (Active Template Library)

creating, 553-559
developing, 521-522
MFC comparison, 523-528
MFC compatiblity, 522-523
templates, 522, 557-558

background, 520
button, 60
check box, 60
COleControl class, 543
combo box, 61
creating, 540-543
customizing, see custom controls
date/time picker, 65
defined, 58
design patterns, 530
developing, 521
disadvantages, 521
edit box, 60
events

adding, 533-534, 544-546, 555-556
DataStream, 548-550
defining, 534-535
handlers, 69-71
maps, 534

extended combo box, 66
group box, 60
hot key, 63

creating, 86
default values, 86-87
global hot keys, 87
methods, 85-86
thread-specific hot keys, 87

image lists, 107-108

creating, 109-110
methods, 108-109

initializing

InitCommonControls method, 80
InitCommonControlsEx method, 80-81

interacting with, 68-69
interfaces

component categories, 528-529
defining, 543-551, 557
ICatInformation, 529-530
ICatRegister, 529

IP (Internet Protocol) address, 65
licenses, 420
list, 63
list box, 61
list view, 110

adding items to, 119
creating, 116-117
image lists, 113-114
implementing, 117-118
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

Media Player, 1119-1120

CMediaPlayer class, 1121-1122
Projection application, 1122-1131
supported media formats, 1119-1120

month calendar, 65
MSIE (Internet Explorer control)

CHtmlView wrapper class, 824-827
dialog-based applications, 827-828
events, 823-824
IWebBrowser2 interface, 819-822

notifications, 81

codes, 82
message structure, 82
ON_NOTIFY macro, 83-84
ON_NOTIFY_RANGE macro, 84-85
process, 82-83

persistence

defined, 422
version support, 423

picture, 59
progress bars

creating, 106
methods, 105-106
range/current position, 106-107

progress indicator, 62
properties

adding, 544, 554
ambient, 531-533
custom, 530-531
editors, 535
m AcquireData, 548
m BufferSize, 548
read-only, 531
stock, 531
write-only, 531

property pages

adding, 433, 536-538
data mapping, 431-432
declaring, 433
IPropertyPage interface, 536
IPropertyPageSite interface, 536
runtime, 535

radio button, 61
registering

AfxOleRegisterControlClass function, 417
AfxOleRegisterProperty-PageClass function, 417
AfxOleRegisterTypeLib function, 417
AfxOleUnregisterClass function, 417
AfxOleUnregisterTypeLib function, 418

registration, 538-539

re-registration, 543
scripts, 539
self-registration, 539

rich edit, 64-65, 135-137

CHARFORMAT structure, 138-139
creating, 145
methods, 142-145
implementing, 145-146
PARAFORMAT structure, 139-141
support for, 257
window styles, 137

scrollbars, 62
serialization, 422-424
sliders, 63, 95

creating, 100
messages, 96-98
methods, 98-100
resizing, 104
SLIDER1 sample application, 100-104
window styles, 95-96

specifications, 520
spin, 62, 88

buddy windows, 88
creating, 91
messages, 90
methods, 90-91
SPIN1 sample application, 91-94
window styles, 89

static text, 59
tab, 64, 125

adding tabs to, 130
creating, 129
message handlers, 130-131
methods, 127-128
notification messages, 126-127
TC_ITEM structure, 128-129
window styles, 125-126

testing, 551-552
Test Container utility, 551
tree view, 64

creating, 123
implementing, 124
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

types, 58-59
VBX, 520

ControlWizard

controls, creating, 541
property pages, adding, 537

Contruct method, 329
converting string types, 597-599
cookies

retrieving, 896-897
setting, 895

cooperative levels (DirectDraw)

DDSCL_ALLOWMODEX, 1087
DDSCL_ALLOWREBOOT, 1087
DDSCL_CREATEDEVICEWINDOW, 1087
DDSCL_EXCLUSIVE, 1087
DDSCL_FULLSCREEN, 1087
DDSCL_NORMAL, 1087
DDSCL_NOWINDOWCHANGES, 1087
DDSCL_SETDEVICEWINDOW, 1087
DDSCL_SETFOCUSWINDOW, 1087
defined, 1086
setting, 1087

coordinate axes, 1029
coordinate methods (CDC class), 152
coordinate space, 1028
coordinate systems (GDI)

logical, 165-167
physical, 165

coplanar polygons, 1030
Copy method, 144
copy-on-write feature, 1196
CopyDDBitmap method, 1106, 1110
CopyRect method, 174
CopyRgn method, 178, 164
CopyTo method, 564-565
counting references, 382
CPage1 class, 1212-1214
CPage2 class, 1218
CPage3 class, 1217
CPaintDC class, 153-154
CPalette class, 163
CPen class, 160-161, 170
CPictureHolder class, 443
CPoint class, 169-170
CPrintDialog class, 76
CProgressCtrl class

initializing, 106
methods, 105-106
range/current position, 106-107

CPropertyPage class, 329, 1201-1202
CPropertySheet class, 327-328, 1200-1201

message routing, 261
methods, 328-329

CPropExchange class, 443
Create method, 856, 1200

CCommand class, 707
CDaoQueryDef class, 683
CDaoWorkspace class, 678
CWnd class, 36

CreateAccessor method, 700
CreateBitmap method, 200
CreateBitmapIndirect method, 200
CreateBrushIndirect method, 161
CreateChildControls method, 101-103
CreateClipper method, 1101
CreateCommand method, 707
CreateCompatibleBitmap method, 200
CreateControl method, 36
CreateDIBPatternBrush method, 161
CreateDirectory method, 916
CreateDiscardableBitmap method, 200
CreateDispatch method, 493
CreateDragImage method, 122
CreateEllipticRgn method, 164, 178
CreateEllipticRgnIndirect method, 164, 178
CreateEx method, 36
CreateFont method, 162, 190
CreateFontIndirect method, 162, 190
CreateFromData method, 164, 178
CreateFromPath method, 164, 178
CreateHatchBrush method, 161
CreateInstance method, 385
CreateIoCompletionPort method, 1005
CreateKey method, 1171
CreateLocator method, 922
CreateNewDocument method, 283
CreateNewFrame method, 283
CreateParameter method, 722-723
CreateParameterAccessor method, 700
CreatePatternBrush method, 161
CreatePen method, 160
CreatePenIndirect method, 160
CreatePointFont method, 162, 191
CreatePointFontIndirect method, 162, 191
CreatePolygonRgn method, 164, 178
CreatePolyPolygonRgn method, 164, 178
CreateRectRgn method, 164, 178
CreateRectRgnIndirect method, 164, 178
CreateRoundRectRgn method, 164, 178
CreateSolidBrush method, 161
CreateStatic method, 341
CreateStorage method, 564
CreateStream method, 564
CreateSurface method, 1094, 1098
CreateSysColorBrush method, 161
CreateThread method, 25
CreateView method, 341
CreateWindowEx function, 11
CReBar class, 315. See also rebars
CRecordset class

derived classes

CBooksRecordset, 670-671
constructors, 672
creating, 668-670
field data, 673

methods

AddNew, 674
CancelUpdate, 677
Delete, 676-677
Edit, 675-676
MoveFirst, 674
MoveLast, 674-675
MoveNext, 674-675
MovePrev, 674-675
Requery, 677
Update, 677

CRecordView class, 287
CRect class, 174-175
CRectTracker class, 447
CResourceException class, 802
CRgn class, 163-164
CRichEditCntrItem class, 441
CRichEditCtrl class, 135-137

CHARFORMAT structure, 138-139
implementing, 145-146
initializing, 145
methods

Clipboard methods, 143-144
editing methods, 143
formatting methods, 142-143
general-purpose methods, 144-145
line-related methods, 141-142
text-selection methods, 142

PARAFORMAT structure, 139-141
window styles, 137

CRichEditDoc class, 441
CRichEditView class, 288
crMask parameter (CImageList control), 110
cross-product calculations, 1031-1032
CRowset class, 701-704
CRuntimeClass class, 280
CScrollView class, 286
CSession class, 693-695
CSharedFile class class, 769-770
CSingleDocTemplate class, 255-256, 278-279
CSliderCtrl class

initializing, 100
messages, 96-98
methods, 98-100
SLIDER1 sample application, 100-102

header files, 102-103
implementing, 103-104

window styles, 95-96

CSockDlg application (socket application), 869

CAsyncSocket class inheritance, 874-876

include statements, 875
OnAccept method, 875
OnInitDialog method, 876
SetParent method, 874

closing connections

OnBclose method, 883
OnClose method, 882-883

opening connections, 876-879

OnAccept method, 878
OnBconnect method, 877
OnConnect method, 878

sending/receiving messages, 880-882

OnBsend method, 880-881
OnReceive method, 881

shell, 870
window layout

control property settings, 871-872
control variables, 873
OnRType method, 873

CSocket programming. See sockets
CSpinButtonCtrl class

buddy windows, 88
initializing, 91
messages, 90
methods, 90-91
SPIN1 sample application, 91-92

header, 92-93
implementing, 93-94

window styles, 89

CSplashWnd class, 270
CSplitterWnd class, 340-342
CStatusBar class, 315. See also status bars
CStdioFile class

methods, 765-767
MFC_CSTR_KLUDGE macro, 767-768

CString class, 741

allocating strings, 734-736
comparing strings, 738
concatenating strings, 736
CStringData structure, 733-735
data members, 732-733
declaration, 733
methods

AllocBuffer, 734
Compare, 738
Find, 737
ReverseFind, 737-738

searching strings, 737-738
SplitPartsString utility, 738-741

CStringData structure, 733-735
CTabCtrl class

adding tabs, 130
initializing, 129
message handlers, 130-131
methods, 127-128
notification messages, 126-127
TC_ITEM structure, 128-129
window styles, 125-126

CTable class, 707-708
CTapi class, 1002
CToolBar class, 315. See also toolbars
CTreeCtrl class

implementing, 124
initializing, 123
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

CTreeView class, 287
cursors

defined, 659
hyperlink control, 231-232

CUserException class, 806
custom controls, 66, 214

affordance, 214
clock, 217

class definition, 218
face-painting routine, 220-221
hand-painting routine, 221-224
metrics, 219-220
time display, 224

hyperlink control, 225-227

cursor, controlling, 231-232
font processing, 228-229
implementation strategy, 227-228
keyboard input, 234-236
links, launching, 236-237
mouse input, 232-234
painting routines, 229-230

notifications, 239
Resource Editor, 240
subclassing limitations, 237-239
ZIP code edit control

FormatContents method, 216
implementation, 216-217
message map handler, 215-216

custom exception classes

example, 810
header files, 808-809
implementation, 809

custom properties, 530-531
Cut method, 144
CView class, 285

message routing, 261
methods, 43, 347

DoPreparePrinting, 348
GetDocument, 44
OnActivateFrame, 44
OnActivateView, 44
OnBeginPrinting, 348-349
OnDraw, 43
OnEndPrinting, 348-349
OnEndPrintPreview, 348
OnPrepareDC, 348-349
OnPreparePrinting, 348
OnPrint, 348-349
OnUpdate, 43

CWave class, 1134-1140

Wave.cpp source code file, 1135-1139
Wave.h header file, 1134-1135

CWinApp class, 29

accessing, 242-243
application lifetime, 243
application-specific initialization

3D dialog support, 254
automation support, 253-254, 257
command-line handling, 257-259
container support, 254
dialog applications, 250-251
document template classes, 255-256
main frame window creation, 256
MDI (multiple document interface) applications, 251-252
Registry usage, 254
rich edit control support, 257
SDI (single document interface) applications, 251

command-line parsing, 33
data members, 245

m_nbHelpMode, 248
m_hInstance, 246
m_hPrevInstance, 246-247
m_lpCmdLine, 247
m_nCmdShow, 247-248
m_pActiveWnd, 248
m_pMainWnd, 248
m_pszAppName, 245
m_pszExeName, 248
m_pszHelpFilePath, 248
m_pszProfileName, 248
m_pszRegistryKey, 248-249

document support

AddDocTemplate method, 31
AddToRecentFileList method, 32
EnableShellOpen method, 32
GetFirstDocTemplatePositi-on method, 31
GetNextDocTemplate method, 31
LoadStdProfileSettings method, 32
OpenDocumentFile method, 32
RegisterShellFileTypes method, 32
UnregisterShellFileTypes method, 32

registry support

GetAppRegistryKey method, 30
GetProfileBinary method, 31
GetProfileInt method, 31
GetProfileString method, 31
GetSectionKey method, 30
RegCloseKey method, 30
SetRegistryKey method, 30
WriteProfileBinary method, 31
WriteProfileInt method, 31
WriteProfileString method, 31

CWindowDC class, 156-157
CWinThread class, 24

methods

ExitInstance, 26
ExitInstance, 244
GetThreadPriority, 27
InitInstance, 26
InitInstance, 244, 250-253
IsIdleMessage, 28
OnIdle, 28
OnIdle, 245
PreTranslate, 28
ProcessMessageFilter, 28
ProcessWndProcException, 28
ResumeThread, 27
Run, 27
Run, 244
SetThreadPriority, 27
SuspendThread, 27

user interface threads

creating, 25-26
defined, 25
terminating, 26

worker threads, 25

CWnd class, 34

container support, 572-573
methods

Attach, 37
CenterWindow, 39
ContinueModal, 39
Create, 36
CreateControl, 36
CreateEx, 36
Detach, 37
EnableToolTips, 39
EndModalLoop, 39
ExecuteDlgInit, 37
FromHandle, 36
FromHandlePermanent, 36
GetOwner, 38
GetSafeHwnd, 38
GetStyle, 38
ModifyStyle, 38
ModifyStyleEx, 38
PreCreateWindow, 37
PreSubclassWindow, 38
RunModalLoop, 39
SetOwner, 38
SubclassDlgItem, 37
SubclassWindow, 37
UnsubclassWindow, 37
UpdateData, 39
UpdateDialogControls, 39

registering, 35

cx parameter (CImageList control), 110
CXEvent class, 749-753
CXEventRecorder class, 749-753
CXParticipant class, 749-753
cy parameter (CImageList control), 110
CZipEdit control

FormatContents method, 216
implementation, 216-217
message map handler, 215-216

D
DAO (Data Access Objects), 664, 677-678

advantages, 665
CDaoDatabase class, 679-680
CDaoQueryDef, 682-684
CDaoRecordset class, 680
CDaoTableDef class, 681-682
CDaoWorkspace class, 678-679

data binding (ADO), 708-709
Data Link Properties dialog (ATL Object Wizard), 688-689
data, marshaling, 474
databases, 656. See also SQL (Standard Query Language)

cursors, 659
DAO (Data Access Objects), 664, 677-678

advantages, 665
CDaoDatabase class, 679-680
CDaoQueryDef class, 682-684
CDaoRecordset class, 680
CDaoTableDef class, 681-682
CDaoWorkspace class, 678-679

designing, 658
navigating, 674-675
normalization, 659
ODBC (open database connectivity), 664

advantages, 665
CDatabase class, 666-668
CRecordset class, 668-677

records

defined, 657
deleting, 663, 676-677
editing, 675-676
inserting, 662, 674

tables

columns, 657
data retrieval, 661-662
defined, 657
updating, 663
viewing layout of, 681

transactions

begin actions, 659
commit actions, 660
defined, 659
rollback actions, 660

DataFormats subkey (COM objects), 540
datagram sockets, 857
DataStream event, 548-550
datatypes

ADO (ActiveX Data Objects), 722-723
OpenGL, 1033-1034
strings, 732, 741

allocating, 734-736
BSTRs, 405, 594-597
class declaration, 733
comparing, 738
concatenating, 736
CStringData structure, 733-735
data members, 732-733
searching, 737-738
SplitPartsString utility, 738-741
UNL_MultiEd application, 749-754
wide-character, 594, 597-599

VARIANT, 407, 599-600

automation, 473-476
CComVariant templates, 603-604
discriminated unions, 600-601
discriminators, 601-602

date/time picker control, 65
dbConsistent flag (Execute method), 680
dbDenyWrite flag (Execute method), 680
dbFailOnError flag (Execute method), 680
dbInconsistent flag (Execute method), 680
dbSeeChanges flag (Execute method), 680
dbSQLPassThrough flag (Execute method), 680
DCOM (Distributed COM), 399-400

method invocation, 402-404
object creation

CoCreateInstance method, 400-401
CoCreateInstanceEx method, 401
monikers, 402

object initialization, 402
OBJREFS (object references), 404
security, 404-405

DDBs (device-dependent bitmaps)

BITMAP structure, 198-199
discardable, 198
nondiscardable, 198

DDC_OCTextRO function, 425
DDP_CBIndex function, 432
DDP_CBString function, 432
DDP_CBStringExact function, 432
DDP_Check function, 432
DDP_LBIndex function, 432
DDP_LBString function, 432
DDP_LBStringExact function, 432
DDP_PostProcessing function, 432
DDP_Radio function, 432
DDP_Text function, 432
DDSCL_ALLOWMODEX cooperative level (DirectDraw), 1087
DDSCL_ALLOWREBOOT cooperative level (DirectDraw), 1087
DDSCL_CREATEDEVICEWINDOW cooperative level (DirectDraw), 1087
DDSCL_EXCLUSIVE cooperative level (DirectDraw), 1087
DDSCL_FULLSCREEN cooperative level (DirectDraw), 1087
DDSCL_NORMAL cooperative level (DirectDraw), 1087
DDSCL_NOWINDOWCHANGES cooperative level (DirectDraw), 1087
DDSCL_SETDEVICEWINDOW cooperative level (DirectDraw), 1087
DDSCL_SETFOCUSWINDOW cooperative level (DirectDraw), 1087
DDSURFACEDESC structure, 1094
DDS_OCColor function, 425
DDV_MinMaxDateTime function, 425
DDX (Dialog Data Exchange), 72

DoDataExchange method, 73
exchange/validation macros, 424-425
UpdateData method, 73-74
WIZARD1.EXE application, 1214

DDX_DateTimeCtrl function, 425
DDX_MonthCalCtrl function, 425
DDX_OCBool function, 425
DDX_OCBoolRO function, 425
DDX_OCColorRO function, 425
DDX_OCFloat function, 425
DDX_OCFloatRO function, 425
DDX_OCInt function, 425
DDX_OCIntRO function, 425
DDX_OCShort function, 425
DDX_OCShortRO function, 425
DDX_OCText function, 425
DeactivateAndUndo method, 568
deallocating memory

BSTRs, 595-596
OpenGL display lists, 1064

decals, 1026
DECLARE_CONNECTION_MAP macro, 431
DECLARE_DISPATCH_MAP macro, 426
DECLARE_DYNAMIC macro, 15
DECLARE_DYNCREATE macro, 16
DECLARE_EVENTSINK_MAP macro, 429
DECLARE_EVENT_MAP macro, 428
DECLARE_MESSAGE_MAP macro, 21, 265
DECLARE_OLECREATE macro, 421
DECLARE_OLECREATE_EX macro, 421
DECLARE_OLETYPELIB macro, 433
DECLARE_PROPPAGEIDS macro, 433
DECLARE_SERIAL macro, 17
declaring

class factories, 385
classes

CDocManager, 281-282
CFile, 761-764
CString, 733

connection maps, 431
dispatch maps, 426
events

ATL, 534-535
event maps, 428, 534

graphic objects, 159
interfaces, 486-487

automation, 466
controls, 543-551, 557
dispinterfaces, 490
IDL (Interface Definition Language), 487-489
ODL (Object Definition Language), 489-490

OpenGL display lists, 1060
sink maps, 429

declspec keyword, 1182, 1186
DefaultDatabase property (ADOConnection class), 715
DefaultIcon subkey (COM objects), 540
DEFAULT_PARSE_COMMAND macro, 959
DefinedSize property (ADOField class), 724
DeflateRect method, 174
delegation. See containment
DELETE statement (SQL), 663
Delete method, 676-677

ADORecordset class, 720
CException class, 797-798
CRowset class, 702-704

DeleteAllItems method, 122, 127
DeleteContents method, 46
DeleteImageList method, 108
DeleteItem method, 122, 127
DeleteMenu method, 311
deleting

exceptions, 810-812
files, 918
OpenGL rendering contexts, 1040
records, 663

ADO (ActiveX Data Objects), 714
Delete method, 676-677

Registry keys, 1172-1174
Registry name/value pairs, 1174-1176

deriving custom exception classes

example, 810
header files, 808-809
implementation, 809

DescribePixelFormat method, 1046
Description property (ADOError class), 726
design patterns, 530
designing

databases, 658
DLLs (dynamic link libraries), 1192-1193

DestroyElement method, 564
DestroySharedMenu method, 462
DestroyWindow function, 13
destructors, 1189-1190
Detach method, 37, 108
DetachDispatch method, 494
developing controls, 521-528
development history

COM (Component Object Model), 374-375
DirectX, 1078
MFC (Microsoft Foundation Classes), 8-9
OpenGL, 1024-1025
TAPI (Telephony API), 995

version 1.3, 995
version 1.4, 996
version 1.5, 996
version 2, 996-997
version 2.1, 997
version 2.2, 997-998
version 3, 998-999

device contexts

CClientDC class, 155-156
CDC class

base device contexts class, 151
bitmap methods, 152
class members, 151-152
clipping methods, 152
color and color palette methods, 152
coordinate methods, 152
device context methods, 152
drawing attribute methods, 152
drawing tool methods, 152
ellipse and polygon methods, 152
font methods, 152
initialization methods, 152
line output methods, 152
mapping methods, 152
metafile methods, 152
path methods, 153
printer escape methods, 153
region methods, 153
ReleaseAttribDC method, 152
ReleaseOutputDC method, 152
SetAttribDC method, 152
SetOutputDC method, 152
SetRop2 method, 168
simple drawing methods, 153
text methods, 153
type-safe selection methods, 153

class hierarchy, 150-151
CPaintDC class

C application comparison, 153
drawing graphics, 153-154

CWindowDC class, 156-157
display contexts, 148
GDI (Graphics Device Interface), 149-150
information contexts, 149
Intellisense, 150
logical devices, 148
memory contexts, 149
physical devices, 148
printer contexts, 149

device independence, 9
device-dependent bitmaps (DDBs)

BITMAP structure, 198-199
discardable, 198
nondiscardable, 198

device-independent bitmaps (DIBs), 199, 1070-1071
DHTML (dynamic HTML), 818-819, 829

collections, 838

All, 840
iterating through, 841-843

interfaces

IDispatch, 838-839
IHTMLDocument2, 839
IHTMLElement, 843-846
IHTMLElementCollection, 840-841
IHTMLTitleElement, 843

navigation

anchor retrieval, 846-848
scrolling, 849-850

objects, 832

document, 836-837
table of, 833-836

sample application, 830-831

diagnostic support (CObject-derived classes)

AssertValid method, 14
Dump method, 15

Dialing Properties dialog box, 991
dialog bars, 316
dialog boxes. See also property sheets

Add Event, 545
AppWizard

Advanced Options, 455
MFC AppWizard—Step 1, 51
MFC AppWizard—Step 2 of 4, 52
MFC AppWizard—Step 3 of 4, 53
MFC AppWizard—Step 4 of 4, 53

ATL Object Wizard, 687

Data Link Properties, 688-689
New ATL Object, 523
Properties, 688-689
Select Database Table, 689

CFileDialog class

modal implementation, 770-771
OPENFILENAME structure, 772
user-defined, 772-773

Dialing Properties, 991
IDD_PROJECTOR, 1125-1126
Implement Connection Point, 556-557
Insert Resource, 537
Invoke Methods, 552
New Class

adding property pages, 538
automation, 480

OLE classes, 436

COleBusyDialog, 437
COleChangeIconDialog, 437
COleChangeSourceDialog, 437
COleConvertDialog, 437
COleDialog, 438
COleInsertDialog, 438
COleLinksDialog, 438
COlePasteSpecialDialog, 438
COlePropertiesDialog, 438-439
COleUpdateDialog, 439

standard

Color Selection, 75
File Open/Save, 74
Font Selection, 75-76
Print, 76-77

dialog controls. See controls
Dialog Data Exchange. See DDX
dialog-based applications, 52 See also controls

CSockDlg example, 869

CAsyncSocket class inheritance, 874-876
closing connections, 882-883
opening connections, 876-879
sending/receiving messages, 880-882
shell, 870
window layout, 871-873

DDX (Dialog Data Exchange), 72

DoDataExchange method, 73
exchange/validation macros, 424-425
UpdateData method, 73-74

idle processing

command updating, 269-270
WM_KICKIDLE message, 268-269

initialization

InitInstance method, 250-251
member variables, 66
OnInitDialog method, 67

MSIE (Internet Explorer) control, 827-828
standard dialog boxes

Color Selection, 75
File Open/Save, 74
Font Selection, 75-76
Print, 76-77

DIBs (device-independent bitmaps), 199, 1070
diffuse light, 1027, 1067
Direct3D, 1080
DirectDraw, 1080, 1083

bitmaps

copying, 1106-1107
loading, 1103-1105

blits (bitmap block transfers)

Blt method, 1095-1096
defined, 1093

clippers, 1100-1101

associating with frames/surfaces, 1101-1102
creating, 1101

error handling, 1112-1114
initializing, 1083

cooperative levels, 1086-1087
driver enumeration, 1084-1085
video mode enumeration, 1087-1089

page flipping, 1097-1100
palettes

332 palette, 1090-1091
creating, 1089-1091, 1107-1108
management support, 1091-1093
re-establishing, 1109-1111

shutdown, 1114-1116
surfaces, 1093-1094

clearing, 1096-1097
creating, 1094-1095

windowed rendering, 1111-1112

DirectDrawCreate method, 1082, 1086
DirectDrawEnumerate method, 1084
DirectInput, 1080
directives

#import, 501

attributes, 502-504
syntax, 502

#include, 875

directoryFull value (CFileException::m_cause), 801
DirectPlay, 1080
DirectSetup, 1080
DirectSound, 1080, 1131

latency, 1132
objects, 1140

DirectSound, 1141
DirectSound3DBuffer, 1141
DirectSound3DListener, 1141
DirectSoundBuffer, 1142-1143
DirectSoundNotify, 1141

static/streaming sound buffers, 1143
War application

MainFrame.cpp source code file, 1147-1154
MainFrame.h header file, 1146-1147
Resource.h header file, 1144-1145
War.rc resource script, 1145

DirectSound object, 1141
DirectSound3DBuffer object, 1141
DirectSound3DListener object, 1141
DirectSoundBuffer object, 1142-1143
DirectSoundNotify object, 1141
DirectX, 1078-1081

compared to COM programming style, 1081-1082
component startup sequence, 1082-1083
development history, 1078
Direct3D, 1080
DirectDraw, 1080, 1083

bitmaps, loading, 1103-1107
blits (bitmap block transfers), 1093-1096
clippers, 1100-1102
error handling, 1112-1114
initializing, 1083-1089
page flipping, 1097-1100
palettes, 1089-1093, 1107-1111
shutdown, 1114-1116
surfaces, 1093-1097
windowed rendering, 1111-1112

DirectInput, 1080
DirectPlay, 1080
DirectSetup, 1080
DirectSound, 1080, 1131

objects, 1140-1143
static/streaming sound buffers, 1143
War application, 1144-1154

downloading, 1082
HAL (Hardware Abstraction Layer), 1079
HEL (Hardware Emulation Layer), 1079
Media Player control

CMediaPlayer class, 1121-1122
Projection application, 1122-1131
supported media formats, 1119-1120

disabling ToolTips, 71
discardable bitmaps, 198
DiscardUndoState method, 568
disconnecting from TAPI (Telephony API), 1018
discriminated unions, 600-601
discriminators, 601-602
diskFull value (CFileException::m_cause), 801
dispatch IDs (DISPIDs), 469, 495
dispatch interfaces. See dispinterfaces
dispatch maps

automation properties, 427
declaring, 426

DispatchMessage function, 11
DISPID dispidMember argument (Invoke method), 470
DispID parameter (InvokeHelper method), 499
DISPID* rgdispid argument (GetIDsOfNames method), 469
DISPIDs (dispatch IDs), 469, 495
dispinterfaces, 466-467, 486, 838-839

automation servers, 471-472
code listing, 391-392
dual, 472-473
interface definition, 468-469
methods

GetIDsOfNames, 467-470
GetTypeInfo, 467, 470
GetTypeInfoCount, 467, 470
Invoke, 392, 467, 470-471

non-IDispatch-derived interfaces comparison, 471

display lists (OpenGL)

declaring, 1060
defined, 1060
example, 1061-1062
memory allocation, 1064
rendering, 1062-1063
troubleshooting, 1064

DisplayAsDefault property, 532
DisplayBand method, 144
displaying

control bars, 321-322
TEXTMETRIC information, 187-189
WIZARD1.EXE application, 1219-1220
wizards, 1204

DISPPARMS* pdispparams argument (Invoke method), 471
DISP_DEFVALUE macro, 426
DISP_FUNCTION macro, 426
DISP_PROPERTY macro, 427
DISP_PROPERTY_EX macro, 427
DISP_PROPERTY_NOTIFY macro, 427
DISP_PROPERTY_PARAM macro, 427
Distributed COM. See DCOM
DLGC_WANTALLKEYS constant (WM_GETDLGCODE messages), 235
DLGC_WANTARROWS constant (WM_GETDLGCODE messages), 235
DLGC_WANTCHARS constant (WM_GETDLGCODE messages), 235
DLGC_WANTMESSAGE constant (WM_GETDLGCODE messages), 235
DLGC_WANTTAB constant (WM_GETDLGCODE messages), 235
DllRegisterServer method, 542
DLLs (dynamic link libraries), AFX-extension

advantages

code elimination, 1180-1181
extensibility, 1181
modularity, 1181

automation servers, 476
creating, 1181-1182
designing, 1192-1193
exports

by name, 1183
by ordinal, 1183
classes, 1185
data members, 1187
destructors, 1189-1190
explicit functions, 1186-1187
guidelines, 1191-1192
identifiers, 1182
include files, 1190-1191
MFC-generated data, 1187-1189
name mangling, 1183-1185
preprocessor directives, 1185-1186

loading/unloading

AfxFreeLibrary function, 1192
AfxLoadLibrary function, 1192
load addresses, 1195-1197

multiple module definition files, 1194-1195
OpenGL, 1054-1055
resource location, 1193-1194

DllUnregisterServer method, 542
DoBezier method, 195
DockControlBar method, 319
docking control bars, 319
DocNavigator application, 846

anchor retrieval, 847-848
anchor scrolling, 849-850
anchor selection, 848

document object (DHTML), 836-837
document servers, 450-453

CDocItem class, 456
classes

CDocItem, 444-446
COleClientItem, 456
COleIPFrameWnd, 446
COleResizeBar, 446
COleServerDoc, 446
COleServerItem, 446
COleTemplateServer, 446

command-line arguments, 456
in-place frames, 457-458
registration, 454-455

document/view architecture, 276-277

CWinApp class methods

AddDocTemplate, 31
AddToRecentFileList, 32
EnableShellOpen, 32
GetFirstDocTemplatePosition, 31
GetNextDocTemplate, 31
LoadStdProfileSettings, 32
OpenDocumentFile, 32
RegisterShellFileTypes, 32
UnregisterShellFileTypes, 32

documents

creating, 280-282
opening new files, 282-284
single versus multiple, 284-285
templates, 278-280

MDI (Multiple Document Interface) applications, 52, 277, 295-296

data management, 298-299
document templates, 296-298
initialization, 251-252

SDI (Single Document Interface) applications, 52, 277. See also MFCServer application

CSingleDocTemplate class, 278-279
initialization, 251
views, changing, 291-295

servers, 453-454
views

adding, 292
CDaoRecordView class, 287
CEditView class, 288
CFormView class, 287
changing, 291-295
CListView class, 288
CRecordView class, 287
CRichEditView class, 288
CScrollView class, 286
CTreeView class, 287
CView class, 285
frame classes, 292-293
UNL_Single sample application, 288-291

DocumentComplete event, 823-825
documents. See also printing

creating, 44, 280-282
defined, 44
opening new files, 282-284
single vs. multiple, 284-285
templates, 278-280

DoDataExchange method, 73, 339, 1214
DoEllipses method, 180, 195
DoFieldExchange method, 673
DoLines method, 195
DoMetafile method, 195
DoModal method, 327-328, 770-771, 1201, 1204
DoPixels method, 195
DoPoints method, 195
DoPolygon method, 180, 195
DoPolyLine method, 195
DoPreparePrinting method, 348
DoPropExchange method, 423
DoRects method, 195
DoRegions method, 195
DoRegionsDifference method, 195
DoRegionsIntersect method, 195
DoRegionsUnion method, 195
DoRoundRects method, 195
DoTextArial method, 195
DoTextRoman method, 195
DoTextSystem method, 187-189, 195
double buffering, 1025
DownloadBegin event, 823
DownloadComplete event, 823
downloading

DirectX, 1082
files, 917, 931-932
OpenGL, 1025

drag-and-drop, 398, 444
DragAcceptFiles method, 256
DragEnter method, 108
DragLeave method, 108
DragMove method, 108
DragShowNolock method, 108
Draw method, 108
DrawFacePoint method, 220-221
DrawFocusRect method, 229-230
drawing. See also DirectDraw; OpenGL

Bézier curves, 183-184
ellipses, 180-182
graphics

CClientDC class, 155-156
CDC class, 153
CPaintCD class, 154
CWindowDC class, 156-157

lines, 170-172
polygons, 179-180
polylines, 172-174
rectangles, 176-177
regions

Boolean operations, 179
clipping regions, 177
creating, 177-178

text

DrawText method, 193
TabbedTextOut method, 194
TextOut method, 193

tools, 158-159

drawing attribute methods (CDC class), 152
drawing modes, 167-169
drawing tool methods (CDC class), 152
DrawItem method, 127
DrawText method, 193, 229
drivers, enumerating, 1084-1085
drop sources, 398
drop targets, 398
dropping calls (TAPI), 991, 1018
DSTINVERT raster operation, 196
dual interfaces, 393, 472-473, 491, 603, 634-637
Dump method, 15
dwBearerMode variable (TAPI), 1010
dwflags parameter (InvokeHelper method), 499
dwLineFeatures variable (TAPI), 1010
dwLineNameOffset variable (TAPI), 1009
dwLineNameSize variable (TAPI), 1009
dwMask values (CHARFORMAT structure), 139
dwMaxRate variable (TAPI), 1010
dwMediaMode variable (TAPI), 1010
dwNeededSize variable (TAPI), 1009
dwNumAddresses variable (TAPI), 1009
dwProviderInfoOffset variable (TAPI), 1009
dwProviderInfoSize variable (TAPI), 1009
dwStringFormat variable (TAPI), 1009
dwSwitchInfoOffset variable (TAPI), 1009
dwSwitchInfoSize variable (TAPI), 1009
dwTotalSize variable (TAPI), 1009
dx parameter (CImageList control), 110
dy parameter (CImageList control), 110
Dynamic class, 16
dynamic HTML. See DHTML
dynamic link libraries. See DLLs
DYNAMIC_DOWNCAST macro, 16
dynasets, 670
DynCreate class, 16
E
early binding, 388, 634
edit box control, 60
edit control (ZIP code example)

FormatContents method, 216
implementation, 216-217
message map handler, 215-216

Edit menu, Insert New Control command, 551
Edit method, 675-676
editing

DLL (dynamic link library) load addresses, 1196
properties, 535
records

ADO (ActiveX Data Objects), 713
Edit method, 675-676

tables, 663
views, 463-465

EditLabel method, 122
editors

property, 535
Resource Editor, 240

ellipse and polygon methods (CDC class), 152
Ellipse method, 180-182
ellipses, 180-182
email. See MAPI (Messaging Application Programming Interface)
embedded data, 439
EmptyUndoBuffer method, 143
Enable method, 325
EnableAutomation method, 23-24
Enabled property, 531
EnableModeless method, 568
EnableShellOpen method, 32, 256
EnableStatusCallback method, 897
EnableToolTips method, 39, 71
enabling

automation, 477
fog effects, 1075
ToolTips, 71, 323-324

encapsulation, 9
EndDialog method, 1201
EndDrag method, 108
ending. See stopping
EndModalLoop method, 39
EndModalState method, 43
endOfFile value

CArchiveException::m_cause, 800
CFileException::m_cause, 801

EndRequest method, 914
EndWaitCursor method, 22
END_CONNECTION_MAP macro, 431
END_CONNECTION_PART macro, 431
END_DISPATCH_MAP macro, 426
END_EVENTSINK_MAP macro, 429
END_EVENT_MAP macro, 428
END_MESSAGE_MAP macro, 22, 265
END_OLEFACTORY macro, 421
END_PARSE_MAP macro, 942
END_PROPPAGEIDS macro, 433
EnsureVisible method, 122
EnumDisplayModes method, 1087
EnumElements method, 564
enumeratiions

DirectDraw drivers, 1084-1085
DirectDraw video modes, 1087-1089
OLE_APPTYPE, 413

EOF property (ADORecordset class), 719
EqualRect method, 174
EqualRgn method, 164, 178
ErrnoToException method, 802
Errors collection, 717
errors. See exceptions
event handlers

creating, 69-71
hyperlink control

keyboard events, 234-236
mouse events, 232-234

event maps, 427

declaring, 428
event-mapping macros, 428
message-mapping verbs, 428-429

event-driven programming, 533
events, 533

ATL (Active Template Library), 534-535
controls, adding, 533-534, 544-546, 555-556
DataStream, 548-550
event maps, 534
handlers, 69-71
MSIE (Internet Explorer) control, 823-824
participants

adding, 753-754
removing, 754

script management, 651
scripting, 649-651
socket events

notification flags, 864
notification functions, 862-863
triggering, 863-864

EVENT_CUSTOM macro, 428
EVENT_CUSTOM_ID macro, 428
EXCEPINFO* pexcepinfo argument (Invoke method), 471
exceptions, 782

C++, 792-797

example, 793-794
syntax, 793
throwing, 794-795

classes

CArchiveException class, 799-800
CDaoException class, 806-807
CDbException class, 803-805
CException class, 795-798
CFileException class, 800-802
CInternetException class, 807-808
CMemoryException class, 799
CNotSupportedException class, 799
COleDispatchException class, 805-806
COleException class, 803
CResourceException class, 802
CUserException class, 806
custom classes, 808-810

combining types of, 813-814
deleting, 810-812
example, 784-785
macros, 812-813
serialization, 18
structured, 786-788

nesting, 788-789
raising, 789-790
try/finally blocks, 790-792

throwing, 418
types, 785-786
WinInit, 901

exclude attribute (#import directive), 503
Exec method, 569
Execute method

ADOCommand class, 722
ADOConnection class, 716-717
CDaoDatabase class, 680
CDaoQueryDef class, 684

ExecuteDlgInit method, 37
ExecuteSQL method, 667
ExitInstance method, 26, 244, 616
Expand method, 122
explicit functions, 1186-1187
explicit serialization, 19
exponential rolloff fog effects (OpenGL), 1075
exporting DLLs (dynamic link libraries)

classes, 1185
data members, 1187
destructors, 1189-1190
explicit functions, 1186-1187
guidelines, 1191-1192
identifiers, 1182
include files, 1190-1191
MFC-generated data, 1187-1189
by name, 1183
name mangling, 1183-1185
by ordinal, 1183
preprocessor directives, 1185-1186

extended combo box control, 66
Extended Telephony Services, 994-995
extension DLLs. See AFX DLLs
EXTENSION_CONTROL_BLOCK structure, 949-950
ExtractIcon method, 108
F
face (clock control), painting, 220-221
factories (class)

defined, 376
IClassFactory interface, 385
macros, 420-421

families (fonts), 185-186
FContinue method, 569
FContinuePrinting method, 569
FD_ACCEPT flag, 864
FD_CLOSE flag, 864
FD_CONNECT flag, 864
FD_OOB flag, 864
FD_READ flag, 864
FD_WRITE flag, 864
FF_DECORATIVE font family, 185
FF_DONTCARE font family, 185
FF_MODERN font family, 185
FF_ROMAN font family, 185
FF_SCRIPT font family, 185
FF_SWISS font family, 185
Fields collection, 721
file I/O (input/output)

CFile class, 758-759

CFileStatus structure, 761
declaration, 761-764
file modes, 759-760
methods, 760
Windows API function map, 764-765

CFileDialog class

modal implementation, 770-771
OPENFILENAME structure, 771-772
user-defined, 772-773

CMemFile class, 768-769
CSharedFile class, 769-770
CStdioFile class

methods, 765-767
MFC_CSTR_KLUDGE macro, 767-768

streams, 778-780

filebuf class, 779
fstream class, 779-780
istream class, 779
ostream class, 779
streambuf class, 779

File menu, New command, 50
File Open dialog box, 74
File Save dialog box, 74
File Transfer Protocol (FTP), 887-888
file view, 54-55
filebuf class, 779
fileNotFound value (CFileException::m_cause), 801
files. See also FTP (File Transfer Protocol)

compound, 394
headers, see header files
include, 1190-1191
INI files, 1161
modes, 759-760
opening, 282-284, 773-776
reading, 776-778
Resources.h, 56
WAV format

creating, 1132
CWave class, 1134-1140
playing, 1132-1133

WinInit

closing, 899
navigating, 900-901
opening, 899
read/write communications buffers, 901
reading, 900
writing, 900

FileView tab (Visual Studio), 54-55
FillRect method, 176
final page (WIZARD1.EXE application), 1208, 1218-1219
finally keyword, 790-792
Find method, 737
FindFile method, 918-920
finding files, 918-921
FindName method, 389
FindNextFile method, 918
FindText method, 144
Fire_IsDirty method, 650
fixed width fonts, 185
flFlags data member

MapiFileDesc structure, 975
MapiMessage structure, 974

Flip method, 1100
flipping. See page flipping
floating pop-up menus, 313-314
Flush method, 899
focus (keyboard), 303
fog effects, 1074-1075
font methods (CDC class), 152
Font property, 531
Font Selection dialog box, 75-76
fonts, 184

CFont class, 192

CreateFont method, 162
CreateFontIndirect method, 162
CreatePointFont method, 162
CreatePointFontIndirect method, 162
FromHandle method, 162
GetLogFont method, 163
methods, 190-191
operator HFONT method, 163

creating, 163, 191-192
defined, 185
drawing

DrawText method, 193
TabbedTextOut method, 194
TextOut method, 193

families, 185-186
fixed width, 185
hyperlink control, 228-229
LOGFONT structure

code listing, 189
members, 189-190

logical vs. physical, 189
variable width, 185
WIZARD1.EXE application, 1211-1212

Food for Thought page (WIZARD1.EXE application)

CPage2 class, 1217
template, 1207

force feedback, 1080
ForeColor property, 531
form processing

CMembrAppExtension, 954

CHttpServer object, 955
debug mode, 955-956
form submission, 959
GET/POST request handling, 957-958
handler method, 960-961, 967-968
OnParseError override, 962-963
parse map, 960, 964-965
running with IIS (Internet Information Server), 956-957

CMyExtension (ISAPI extension)

class declaration, 936-937
class implementation, 944-945
ClassWizard override declarations, 937
command handlers, 951-953
CWinApp declaration, 941
EXTENSION_CONTROL_BLOCK structure, 949-950
GetExtensionVersion method, 945
HttpExtensionProc method, 945-951
implementation file, 938-940
object declaration, 944
parse map, 938, 941-944

FormatContents method, 216
FormatRange method, 144
frame rates, 1093
frames

classes, 292-293
in-place, 457-458

FreeRecordMemory method, 706
FromHandle method
FromHandle method, 36, 178, 200

CBrush class, 161
CFont class, 162
CPen class, 160
CRgn class, 164

FromHandlePermanent method, 36
FromIDispatch method, 24
frustrums, 1026
fstream class, 779-780
FTP (File Transfer Protocol), 7-888

client application

directory navigation, 930-931
file listings, 929-930
file retrieval, 931-932
initialization, 926-928
server connection, 928-929
shell, 924-926

directory navigation, 916, 930-931
files

attributes, 919-920
copying, 916
deleting, 918
downloading, 917, 931-932
finding, 918-921
listing, 929-930
opening, 917
renaming, 917

WinInit connections

CFileFind class, 918-920
CFtpConnection class, 916-918
CFtpFileFind class, 920-921
GetFtpConnection method, 894-895

full servers, 451
functions. See also methods

AFX functions

AfxBeginThread, 25-26
AfxComparePath, 765
AfxConnectionAdvise, 414-416
AfxConnectionUnadvise, 416-417
AfxEnableControlContainer, 414
AFXEndThread, 25
AfxFindResourceHandle, 1193-1194
AfxFreeLibrary, 1192
AfxFullPath, 765
AfxGetApp, 29
AfxGetApp, 242
AfxGetAppName, 29
AfxGetFileName, 980
AfxGetFileTitle, 765
AfxGetInstanceHandle, 29
AfxGetMainWnd, 35
AfxGetResourceHandle, 29
AfxGetRoot, 765
AfxInitRichEdit, 257
AfxLoadLibrary, 1192
AfxLoadString, 1193
AfxOleCanExitApp, 410
AfxOleGetMessageFilter, 411
AfxOleGetUserCtrl, 411-412
AfxOleInit, 257, 418-419
AfxOleInitModule, 419
AfxOleLockApp, 412
AfxOleLockControl, 414
AfxOleRegisterControlClass, 417
AfxOleRegisterPropertyPageClass, 417
AfxOleRegisterServerClass, 413
AfxOleRegisterTypeLib, 417
AfxOleSetEditMenu, 413-414
AfxOleSetUserCtrl, 412
AfxOleTypeMatchGuid, 420
AfxOleUnlockApp, 413
AfxOleUnlockControl, 414
AfxOleUnregisterClass, 417
AfxOleUnregisterTypeLib, 418
AfxParseURL, 911-912
AfxParseURLEx, 913
AfxPostQuitMessage, 26
AfxRegisterClass, 35
AfxRegisterWndClass, 35
AfxResolveShortCut, 765
AfxSetResourceHandle, 29
AfxSocketInit, 855
AfxThrowArchiveException, 800
AfxThrowDaoException, 807
AfxThrowDbException, 805
AfxThrowFileException, 801-802
AfxThrowInternetException, 808
AfxThrowMemoryException, 799
AfxThrowNotSupportedException, 799
AfxThrowOleDispatchException, 418, 805
AfxThrowOleException, 418, 803
AfxThrowResourceException, 802
AfxThrowUserException, 806
AfxVerifyLicFile, 420
AfxWinMain, 11

cmc_ functions

cmc_act_on, 973
cmc_free, 973
cmc_list, 973
cmc_logoff, 973
cmc_logon, 973
cmc_look_up, 973
cmc_query_configuration, 973
cmc_read, 973
cmc_send, 972
cmc_send_documents, 972

DDP_ functions

DDP_CBIndex, 432
DDP_CBString, 432
DDP_CBStringExact, 432
DDP_Check, 432
DDP_LBIndex, 432
DDP_LBString, 432
DDP_LBStringExact, 432
DDP_PostProcessing, 432
DDP_Radio, 432
DDP_Text, 432

DDS_OCColor, 425
DDV_MinMaxDateTime, 425
DDX_ functions

DDX_DateTimeCtrl, 425
DDX_MonthCalCtrl, 425
DDX_OCBool, 425
DDX_OCBoolRO, 425
DDX_OCColorRO, 425
DDX_OCFloat, 425
DDX_OCFloatRO, 425
DDX_OCInt, 425
DDX_OCIntRO, 425
DDX_OCShort, 425
DDX_OCShortRO, 425
DDX_OCText, 425

explicit functions, 1186-1187
MAPI (Messaging API), 972
OpenGL

glBegin, 1036
glBlendFunc, 1073
glCallList, 1062
glClearColor, 1047
glColor, 1069
glDeleteLists, 1064
glDisable, 1057
glEnable, 1057
glEnd, 1036
glEndList, 1061
glGetError, 1064
glLightfv, 1067-1068
glMaterialfv, 1068
glNewList, 1061
glPixelMapfv, 1070
glPixelTransferi, 1071
glPolygonMode, 1057
glPushMatrix, 1037
glRotatef, 1059
glScale, 1062
glScalef, 1059
glTexImage2D, 1071
glTranslatef, 1058
naming conventions, 1034-1036
render function scoping, 1036-1037
wglCreateContext, 1040, 1046
wglDeleteContext, 1040
wglDestroyContext, 1047
wglMakeCurrent, 1040

overloading, 1184
PX_ functions

PX_Blob, 423
PX_Bool, 423
PX_Color, 424
PX_Currency, 424
PX_DataPath, 424
PX_Double, 424
PX_Float, 424
PX_Font, 424
PX_IUnknown, 424
PX_Long, 424
PX_Picture, 424
PX_Short, 424
PX_String, 424
PX_ULong, 424
PX_UShort, 424
PX_VBXFontConvert, 424

STL (Standard Template Library) functions, 754-755
terminate, 794

G
Game SDK (Software Development Kit), 1078
GDI (Graphics Device Interface)

coordinate systems

logical, 165
mapping modes, 166-167
physical, 165

device contexts, 149-150
MFC applications, 150
non-MFC applications, 149

GDI mapping modes. See mapping modes
generic value

CArchiveException::m_cause, 800
CFileException::m_cause, 801

GET requests, 957-958
GetActiveDocument method, 42
GetActiveFrame method, 42
GetActiveIndex method, 1201
GetActivePage method, 1201
GetActiveView method, 42
GetAppRegistryKey method, 30
GetAt method, 747
GetBitmap method, 200
GetBitmapBits method, 200
GetBitmapDimension method, 200
GetBkColor method, 109
GetChannelRect method, 99
GetCharPos method, 144
GetChildItem method, 122
GetColumnCount method, 696
GetColumnName method, 696
GetColumnType method, 696-697
GetContainer method, 566
GetContext method, 899-901
GetControlUnknown method, 573
GetCookie method, 896-897
GetCount method, 122, 747
GetCreationTime method, 919
GetCurFocus method, 127
GetCurrentDirectory method, 916
GetCurrentDirectoryAsURL method, 916
GetCurrentPosition method, 1122
GetCurSel method, 127
GetDefaultCharFormat method, 143
GetDefaultConnect method, 672
GetDefaultSQL method, 672
GetDlgItem method, 1212
GetDocTemplate method, 45
GetDocument method, 44
GetDocument method, 823
GetDragImage method, 109
GetDropHilightItem method, 122
GetEditControl method, 122
GetEditCtrl method, 288
GetErrorCount method, 807
GetErrorMessage method, 798
GetEventMask method, 144
GetExtensionVersion method, 945
GetExtLogPen method, 160
GetFieldCount method, 682
GetFieldInfo method, 682
GetFile method, 47, 917
GetFileName method, 760, 919
GetFilePath method, 760, 919
GetFileTitle method, 760, 919
GetFileURL method, 919
GetFirstDocTemplatePosition method, 31
GetFirstViewPosition method, 46
GetFirstVisibleItem method, 122
GetFirstVisibleLine method, 142
GetFtpConnection method, 894-895
GetFuncDesc method, 389
GetGopherConnection method, 895
GetHead method, 747
GetHotKey method, 86
GetHtmlDocument method, 824, 839
GetHttpConnection method, 893-894
GetIDispatch method, 24
GetIDsOfNames method, 495

arguments, 469
IDispatch interface, 467-470

GetImageCount method, 109
GetImageInfo method, 109
GetImageList method, 122, 127
GetIndent method, 122
GetInPlace method, 460
GetItem method, 122, 127
GetItemCount method, 127
GetItemData method, 122
GetItemImage method, 122
GetItemRect method, 122, 127
GetItemState method, 122
GetItemText method, 122
GetLastAccessTime method, 919
GetLastError method, 865
GetLastWriteTime method, 919
GetLength method, 696, 740, 760, 919
GetLimitText method, 144
GetLine method, 142
GetLineCount method, 142
GetLineSize method, 99
GetLocatorType method, 923
GetLogBrush method, 161
GetLogFont method, 163
GetLogPen method, 160
GetMenu method, 311
GetMenuItemCount method, 311
GetMessage function, 11
GetModify method, 144
GetMoniker method, 566
GetNext method, 747
GetNextDocTemplate method, 31
GetNextItem method, 122
GetNextResult method, 707
GetNextSiblingItem method, 122
GetNextView method, 46
GetNextVisibleItem method, 122
GetNumTics method, 99
GetOwner method, 38
GetPage method, 1201
GetPageCount method, 1201
GetPageIndex method, 1201
GetPageSize method, 99
GetParaFormat method, 143
GetParam method, 699-700
GetParamCount method, 699
GetParameterInfo method, 707
GetParamName method, 699
GetParamType method, 699
GetParentItem method, 122
GetPathName method, 45
GetPeerName method, 865
GetPos method, 99
GetPosition method, 760
GetPrevSiblingItem method, 122
GetPrevVisibleItem method, 122
GetProcAddress function, 980
GetProfileBinary method, 31
GetProfileInt method, 31
GetProfileString method, 31
GetProperty method, 573, 577
GetRange method, 99
GetRangeMax method, 99
GetRangeMin method, 99
GetRect method, 144
GetRegionData method, 164, 178
GetRgnBox method, 164, 178
GetRoot method, 919
GetRootItem method, 122
GetRowCount method, 127
GetSafeHandle method, 109
GetSafeHwnd method, 38
GetSectionKey method, 30
GetSel method, 142
GetSelectedItem method, 122
GetSelection method, 99
GetSelectionCharFormat method, 143
GetSelectionType method, 142
GetSelText method, 142
GetServerName method, 902
GetSession method, 901
GetSockName method, 866
GetSockOpt method, 866
GetSQL method, 684
GetStatus method, 698, 760
GetStyle method, 38
GetSubMenu method, 311
GetSystemMetrics method, 165
GetTabControl method, 1201
GetTail method, 747
GetTempFileName function, 980
GetTempPath function, 980
GetTextLength method, 144
GetThreadPriority method, 27
GetThumbRect method, 99
GetTic method, 99
GetTicArray method, 99
GetTicPos method, 99
GetTitle method, 42, 45
GetTooltips method, 128
GetTypeAttr method, 389
GetTypeInfo method, 467, 470
GetTypeInfoCount method, 389, 467, 470
GetTypeInfoOfGuid method, 389
GetValue method, 697-698
GetVarDesc method, 389
GetVerb method, 915
GetVisibleCount method, 122
GetVolume method, 1122
GetWindowContext method, 567
get_all method, 844
get_anchors method, 846
get_children method, 844
get_document method, 843
get_innerHTML method, 843
get_innerText method, 843-844
get_links method, 840
get_outerHTML method, 843-844
get_parentElement method, 843
get_tagName method, 843
glBegin function, 1036
glBlendFunc function, 1073
glCallList function, 1062
glClearColor function, 1047
glColor function, 1069
glDeleteLists function, 1064
glDisable function, 1057
glEnable function, 1057
glEnd function, 1036
glEndList function, 1061
glGetError function, 1064
glLightfv function, 1067-1068
glMaterialfv function, 1068
glNewList function, 1061
global hot keys, 87
GlobalAlloc method, 769
Globally Unique Identifiers (GUIDs), 380
glPixelMapfv function, 1070
glPixelTransferi function, 1071
glPolygonMode function, 1057
glPushMatrix function, 1037
glRotatef function, 1059
glScale function, 1062
glScalef function, 1059
glTexImage2D function, 1071
glTranslatef function, 1058
GL_LIGHTING parameter (glEnable function), 1065
Gopher, 888

locators

creating, 922
types, 923

WinInit connections

CGopherConnection class, 922
CGopherFile class, 924
CGopherFindFile class, 924
CGopherLocator class, 922-923
GetGopherConnection method, 895

GOPHER_TYPE_ASK locator type, 923
GOPHER_TYPE_BINARY locator type, 923
GOPHER_TYPE_BITMAP locator type, 923
GOPHER_TYPE_CALENDAR locator type, 923
GOPHER_TYPE_CSO locator type, 923
GOPHER_TYPE_DIRECTORY locator type, 923
GOPHER_TYPE_DOS_ARCHIVE locator type, 923
GOPHER_TYPE_ERROR locator type, 923
GOPHER_TYPE_GIF locator type, 923
GOPHER_TYPE_GOPHER_PLUS locator type, 923
GOPHER_TYPE_HTML locator type, 923
GOPHER_TYPE_IMAGE locator type, 923
GOPHER_TYPE_INDEX_SERVER locator type, 923
GOPHER_TYPE_INLINE locator type, 923
GOPHER_TYPE_MAC_BINHEX locator type, 923
GOPHER_TYPE_MOVIE locator type, 923
GOPHER_TYPE_PDF locator type, 923
GOPHER_TYPE_REDUNDANT locator type, 923
GOPHER_TYPE_SOUND locator type, 923
GOPHER_TYPE_TELNET locator type, 923
GOPHER_TYPE_TEXT_FILE locator type, 923
GOPHER_TYPE_TN3270 locator type, 923
GOPHER_TYPE_UNIX_UUENCODED locator type, 923
GOPHER_TYPE_UNKNOWN locator type, 923
goto statements, 783-784
graphical user interfaces. See GUIs
graphics, 2D

Bézier curves, 183-184
bitmaps

BBTs (bit block transfers), 201-202
BITMAP1 sample application, 206-210
CBitmap class, 199-201
color depth, 197-198
DDBs (device-dependent bitmaps), 198-199
DIBs (device-independent bitmaps), 199
resources, 203-205

classes

CBitmap class, 199-201
CClientDC class, 155-156
CDC class, 153
CGdiObject class, 158-159
CPaintCD class, 154
CWindowDC class, 156-157

color depth, 197
DirectDraw, 1080

bitmaps, loading, 1103-1107
blits (bitmap block transfers), 1093-1096
clippers, 1100-1102
error handling, 1112-1114
initializing, 1083-1089
page flipping, 1097-1100
palettes, 1089-1093, 1107-1111
shutdown, 1114-1116
surfaces, 1093-1097
windowed rendering, 1111-1112

drawing tools, 158-159
ellipses, 180-182
image lists, 107-108

creating, 109-110
methods, 108-109

lines

CDC class, 170-174
drawing, 170-172

objects, 148

declaring, 159
Windows drawing tools relationship, 158-159

polygons, 179-180
polylines, 172-174
raster images, 196-197
rectangles, 176-177

CDC class, 176-177
CRect class, 174-176
drawing, 176-177
rounded, 176-177

regions

Boolean operations, 179
clipping regions, 177
creating, 177-178
CRgn class, 163-164

vector images, 167

graphics (3D), 1025

coordinate axes, 1029
coordinate space, 1028
Direct3D, 1080
matrices, 1030
OpenGL, 1024, 1032-1033

blending, 1073
datatypes, 1033-1034
development history, 1024-1025
display lists, 1060-1064
DLLs (dynamic link libraries), 1054-1055
downloading, 1025
fog effects, 1074-1075
function naming conventions, 1034-1036
light, 1064-1068
material properties, 1068-1069
matrix stack, 1037-1038
MFC applications, creating, 1042
models, 1055-1057
render function scoping, 1036-1037
rendering, 1053-1054
rendering contexts, 1038-1041
rotation, 1058-1059
scaling, 1059-1060
texture mapping, 1069-1072
translation, 1058
views, 1043-1053

polygons

coplanar, 1030
decals, 1026
wireframe, 1026

terminology, 1025-1028
translation, 1030
vectors

cross-product calculations, 1031-1032
defined, 1029
normalizing, 1030-1031
resultant, 1029
unit, 1029
vertices, 1029

Graphics Device Interface. See GDI
graphics pages, 196
group box control, 60
GUI objects. See controls, 57
GUIDs (Globally Unique Identifiers), 380
GUIs (graphical user interfaces), 9, 148, 309. See also controls; graphics; wizards

bitmaps

BBTs (bit block transfers), 201-202
BITMAP1 sample application, 206-210
CBitmap class, 199-201
color depth, 197-198
DDBs (device-dependent bitmaps), 198-199
DIBs (device-independent bitmaps), 199
resources, 203-205

control bars, 314-316

CControlBar class, 315
dialog bars, 316
displaying/hiding, 321-322
docking, 319
rebars, 318
status bars, 319-321
toolbars, 316-319

main windows

creating, 11
destroying, 13
window procedures, 9
WinMain function, 10

menus, 310

adding items to, 311-312
floating pop-up menus, 313-314
pointers, 311

message loops, 11-12
property sheets

compared to wizards, 326
CPropertyPage class, 329
CPropertySheet class, 327-329

raster graphics, 196-197
rebars, 315
state management, 324-325
text/fonts, 184-185

CFont class, 190-192
creating, 191-192
drawing, 193-194
families, 185-186
fixed width, 185
LOGFONT structure, 189-190
logical versus physical fonts, 189
TEXTMETRIC structure, 186-189
variable width, 185

toolbars, 315
ToolTips, 323-324

H
halting. See stopping
HandleApp method, 960
handles, 10
hands (clock control), painting, 221-224

NOT XOR raster operation, 223
vertices, 221

HandsOffStorage method, 566
hardIO value (CFileException::m_cause), 801
Hardware Abstraction Layer, 1079
Hardware Emulation Layer, 1079
hardware palettes, 163
hashes, 849
hashing, 747-748
head tag (HTML), 832
header files

CWave class, 1134-1135
exception classes, 808-809
Projection application

ProjectorDlg.h, 1126-1127
Resource.h, 1123

request headers, 913
SLIDER1 application, 102-103
SPIN1 application, 92-93
TLH files (Primary Type Library files)

footer boilerplate, 508
forward references/typedefs, 505
header boilerplate, 504-505
implementation, 508
smart pointer declarations, 505-506
.TLI file, 508-509
Typeinfo declarations, 506-507

War application

MainFrame.h header file, 1146-1147
Resource.h, 1144-1145

Height method, 174
help

ToolTips, 39

disabling, 71
enabling, 71, 323-324
text, 71-72

wizards, 1200-1202. See also WIZARD1.EXE application

creating, 1203-1204
displaying, 1204
notification messages, 1204-1205

hicolor images, 197
HideSelection method, 142
hiding control bars, 321-322
high_method_prefix attribute (#import directive), 503
high_property_prefixes attribute (#import directive), 503
HINSTANCE parameter (WinMain function), 10
history. See development history
HitTest method, 122, 128
HKEY_CLASSES_ROOT key, 1164
HKEY_CURRENT_CONFIG key, 1164
HKEY_CURRENT_USER key, 1164
HKEY_DYN_DATA key, 1164
HKEY_LOCAL_MACHINE key, 1164
HKEY_USERS key, 1164
hot key controls, 63

creating, 86
default values, 86-87
global hot keys, 87
methods, 85-86
thread-specific hot keys, 87

HRESULTs, 407
HTML (Hypertext Markup Language)

dynamic, see DHTML
tags, 832

<html> tag (HTML), 832
HTTP (Hypertext Transfer Protocol), 886-887

CHttpConnection class, 910-913
CHttpFile class, 913-915
GetHttpConnection method, 893-894

HttpExtensionProc method, 945-951
HTTP_QUERY_CUSTOM value (QueryInfo method), 914
HTTP_QUERY_FLAG_NUMBER value (QueryInfo method), 914
HTTP_QUERY_FLAG_REQUEST_HEADERS value (QueryInfo method), 914
HTTP_QUERY_FLAG_SYSTEMTIME value (QueryInfo method), 914
Hungarian naming convention, 1034
hWnd property, 531
hyperlink control, 225-227

cursor, controlling, 231-232
font processing, 228-229
implementation strategy, 227-228
keyboard input, 234-236
links, launching, 236-237
mouse input, 232-234
painting routines

DrawFocusRect method, 229-230
DrawText method, 229

Hypertext Transfer Protocol. See HTTP

I
I/O (input/output)

CFile class, 758-759

CFileStatus structure, 761
declaration, 761-764
file modes, 759-760
methods, 760
Windows API function map, 764-765

CFileDialog class

modal implementation, 770-771
OPENFILENAME structure, 771-772
user-defined, 772-773

CMemFile class, 768-769
CSharedFile class, 769-770
CStdioFile class

methods, 765-767
MFC_CSTR_KLUDGE macro, 767-768

streams, 778-780

filebuf class, 779
fstream class, 779-780
istream class, 779
ostream class, 779
streambuf class, 779

IActiveScript interface, 628, 633
IActiveScriptParse interface, 628, 633
IActiveScriptSite interface, 628-632
IActiveScriptSiteWindow interface, 628-632
IADORecordBinding interface, 711-712
IAdviseSink interface, 567
ICatInformation interface, 529-530
ICatRegister interface, 529
ICC_ANIMATE_CLASS flag (INITCOMMONCONTROLSEX structure), 81
ICC_BAR_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_COOL_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_DATE_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_HOTKEY_CLASS flag (INITCOMMONCONTROLSEX structure), 81
ICC_INTERNET_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_LISTVIEW_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_PAGESCROLLER_CLASS flag (INITCOMMONCONTROLSEX structure), 81
ICC_PROGRESS_CLASS flag (INITCOMMONCONTROLSEX structure), 81
ICC_TAB_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_TREEVIEW_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_UPDOWN_CLASS flag (INITCOMMONCONTROLSEX structure), 81
ICC_USEREX_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICC_WIN95_CLASSES flag (INITCOMMONCONTROLSEX structure), 81
ICheckBook interface, 379
IClassFactory interface, 385
Icon view, 110
IContinueCallback interface, 569
IDataObject interface, 397
IDD_ABOUTBOX resource, 56
IDD_PROJECTOR dialog box, 1125-1126
identifers, 380
IDispatch interface, 391, 466-467, 486, 838-839

automation servers, 471-472
code listing, 391-392
dual, 472-473
interface definition, 468-469
methods

GetIDsOfNames, 467-470
GetTypeInfo, 467, 470
GetTypeInfoCount, 467, 470
Invoke, 392, 467, 470-471

non-IDispatch-derived interfaces comparison, 471

IDL (Interface Definition Language)

automation interfaces, 466
interface definition files, 487-489

idle processing

dialog-based applications

command updating, 269-270
WM_KICKIDLE message, 268-269

OnIdle method, 266-268

IDR_MAINFRAME resource, 57
IDs (identifiers), 380
ID_EDIT_UNDO macro, 325
ID_FILE_PRINT command identifier, 351
ID_FILE_PRINT_DIRECT command identifer, 351
ID_FILE_PRINT_PREVIEW command identifer, 351
ID_FILE_PRINT_SETUP command identifier, 351
if-then-else statements, 782-783
IHTMLDocument2 interface, 839
IHTMLElement interface, 843

inner methods, 844-845
outer methods, 845-846

IHTMLElementCollection interface, 840-841
IHTMLTitleElement interface, 843
IIDs (interface identifiers), 380
image lists, 107-108

creating, 109-110
methods, 108-109

imagelist1 parameter (CImageList control), 110
imagelist2 parameter (CImageList control), 110
images. See graphics
Implement Connection Point dialog, 556-557
implementation_only attribute (#import directive), 503
Implemented Categories subkey (COM objects), 540
IMPLEMENT_DYNAMIC macro, 15
IMPLEMENT_DYNCREATE macro, 16
IMPLEMENT_OLECREATE_EX macro, 421
IMPLEMENT_OLETYPELIB macro, 433
IMPLEMENT_SERIAL macro, 17
implicit serialization, 19
#import directive, 501

attributes, 502-504
syntax, 502

in-place activation

IOleInPlaceFrame interface, 568
IOleInPlaceSite interface, 567-568

in-place frames

document servers, 457-458
toolbars, adding, 457-458

in-process servers, 383
include attribute (#import directive), 503
include files, 1190-1191
incoming interfaces, 398
indexes, hashing, 747-748
InflateRect method, 174
inheritance

class hierarchy, 13
defined, 9
interface, 378

INI files, 1161
InitATL method, 615
InitCommonControls method, 80
INITCOMMONCONTROLSEX structure, 80-81
InitCommonControlsEx method, 80-81
InitDirectSound method, 1147
InitDSBuffers method, 1147, 1153
initialization methods (CDC class), 152
InitializeObjects method, 648
initializing

ADO (ActiveX Data Objects), 709-712
animation controls, 134
application-specific initialization

3D dialog support, 254
automation support, 253-254, 257
command-line handling, 257-259
container support, 254
dialog applications,250-251
document template classes, 255-256
main frame window creation, 256
MDI (multiple document interface) applications, 251-252
Registry usage, 254
rich edit control support, 257
SDI (single document interface) applications, 251

common controls

InitCommonControls method, 80
InitCommonControlsEx method, 80-81

DirectDraw, 1083

cooperative levels, 1086-1087
driver enumeration, 1084-1085
video mode enumeration, 1087-1089

FTP (File Transfer Protocol) client application, 926-928
image lists, 109-110
list view controls, 116-117
member variables, 66
objects, 402, 648-649
progress bars, 106
rich edit controls, 145
slider controls, 100
spin controls, 91
system libraries

AfxOleInit function, 418-419
AfxOleInitModule function, 419

tab controls, 129
TAPI (Telephony API) lines

lineInitialize method, 1003-1004
lineInitializeEx method, 1004-1005

toolbars, 318
Welcome page (WIZARD1.EXE application), 1210-1211
Winsock environment, 855

InitInstance method, 26, 244, 250-251, 296, 615

3D dialog support, 254
automation support, 253-254, 257
command-line handling, 257-259
container support, 254
dialog applications, 250-251
document template classes, 255-256
main frame window creation, 256
MDI (multiple document interface) applications, 251-252
Registry usage, 254
rich edit control support, 257
SDI (single document interface) applications, 251

InitNew method, 566
inject_statement attribute (#import directive), 503
InModalState method, 43
inner methods (IHTMLElement interface), 844-845
InprocHandler32 subkey (COM objects), 540
InprocServer32 subkey (COM objects), 540
input devices. See keyboard; mouse
input/output. See I/O
Insert menu commands

New ATL Object, 536, 687
New Class, 480

Insert New Control command (Edit menu), 551
Insert Resource dialog, 537
INSERT statement (SQL), 662
Insert method, 702-703
Insertable subkey (COM objects), 539
InsertAfter method, 747, 754
InsertBefore method, 747, 754
InsertColumn method, 118
InsertItem method, 123, 128
InsertMenu method, 311-312
InsertMenus method, 568
install applications, 1177
instantiating objects, 68-69
int parameter (WinMain function), 10
integers, 407
Intellisense, 150
interacting with controls, 68-69
Interface Definition Language. See IDL
interfaces, 376

ADO (ActiveX Data Objects), 708
automation

adding, 480-481
IDL (Interface Definition Language), 466

controls

component categories, 528-529
defining, 543-551, 557
ICatInformation, 529-530
ICatRegister, 529

controls code, 546-547
defined, 376
definitions, 486-487

dispinterfaces, 490
IDL (Interface Definition Language), 487-489
ODL (Object Definition Language), 489-490

dispinterfaces (dispatch interfaces), 392, 635
dual, 393, 472-473, 491, 603, 634-637
IActiveScript, 628, 633
IActiveScriptParse, 628, 633
IActiveScriptSite, 628-632
IActiveScriptSiteWindow, 628-632
IADORecordBinding, 711-712
IAdviseSink, 567
ICheckBook, 379
IClassFactory, 385
IContinueCallback, 569
IDataObject, 397
IDispatch, 391, 466-467, 486, 838-839

automation servers, 471-472
code listing, 391-392
GetIDsOfNames method, 467-470
GetTypeInfo method, 467, 470
GetTypeInfoCount method, 467, 470
interface definition, 468-469
Invoke method, 392, 467, 470-471
non-IDispatch-derived interfaces comparison, 471

IHTMLDocument2, 839
IHTMLElement, 843-846
IHTMLElementCollection, 840-841
IHTMLTitleElement, 843
incoming, 398
inheritance, 378
IObjectExporter, 403
IOleClientSite, 566
IOleCommandTarget, 569
IOleDocumentSite, 568
IOleInPlaceFrame, 568
IOleInPlaceSite, 567-568
IPersistFile, 396
IPersistMemory, 396
IPersistMoniker, 396
IPersistPropertyBag, 396
IPersistStorage, 396, 565-566
IPersistStream, 395
IPersistStreamInit, 395
IPropertyPage, 536
IPropertyPageSite, 536
IProvideClassInfo2Impl, 651
IStorage, 563-564
IStream, 565
ITypeInfo, 389
ITypeLib, 389
IUnknown, 377-378

IIDs (interface identifiers), 380
methods, 378-382

IWebBrowser2, 819-822
outgoing, 398
reference counts, 377
user controls, 526-527

Internet Explorer, MSIE control

CHtmlView wrapper class, 824-827
dialog-based applications, 827-828
events, 823-824
IWebBrowser2 interface, 819-822

Internet Server Application Programming Interface. See ISAPI extensions
INTERNET_FLAG_ASYNC value (WinInit session option), 891
INTERNET_FLAG_DONT_CACHE value (FindFile method), 920
INTERNET_FLAG_DONT_CACHE value (WinInit session option), 891
INTERNET_FLAG_EXISTING_CONNECT value (FindFile method), 921
INTERNET_FLAG_OFFLINE value (WinInit session option), 891
INTERNET_FLAG_RAW_DATA value (FindFile method), 921
INTERNET_FLAG_RELOAD value (FindFile method), 920
INTERNET_OPEN_TYPE_DIRECT value (WinInit access type), 891
INTERNET_OPEN_TYPE_PRECONFIG value (WinInit access type), 891
INTERNET_OPEN_TYPE_PROXY value (WinInit access type), 891
INTERNET_STATUS_CLOSING_CONNECTION indicator (WinInit), 898
INTERNET_STATUS_CONNECTED_TO_SERVER indicator (WinInit), 897
INTERNET_STATUS_CONNECTING_TO_SERVER indicator (WinInit), 897
INTERNET_STATUS_CONNECTION_CLOSED indicator (WinInit), 898
INTERNET_STATUS_HANDLE_CLOSED indicator (WinInit), 898
INTERNET_STATUS_HANDLE_CREATED indicator (WinInit), 898
INTERNET_STATUS_NAME_RESOLVED indicator (WinInit), 897
INTERNET_STATUS_RECEIVING_RESPONSE indicator (WinInit), 898
INTERNET_STATUS_REQUEST_COMPLETE indicator (WinInit), 898
INTERNET_STATUS_REQUEST_SENT indicator (WinInit), 897
INTERNET_STATUS_RESOLVING_NAME indicator (WinInit), 897
INTERNET_STATUS_RESPONSE_RECEIVED indicator (WinInit), 898
INTERNET_STATUS_SENDING_REQUEST indicator (WinInit), 897
IntersectRect method, 175
invalidFile value (CFileException::m_cause), 801
Investment Wizard, 329

CInvestmentWiz class

declaring, 339
implementing, 339-340

CInvestWizData class, 333
global variables, 332-333
pages

CInvestWizPage1 class, 334-335
CInvestWizPage2 class, 336-337
CInvestWizPage3 class, 337-338

resources, 330-332

Invoke Methods dialog, 552
Invoke method, 635

arguments, 470-471
IDispatch interface, 467, 470-471

InvokeHelper method, 495, 499, 573, 578
invoking methods, 402-404
IObjectExporter interface, 403
IOleClientSite interface, 566
IOleCommandTarget interface, 569
IOleDocumentSite interface, 568
IOleInPlaceFrame interface, 568
IOleInPlaceSite interface, 567-568
IP (Internet Protocol) address control, 65
IPersistFile interface, 396
IPersistMemory interface, 396
IPersistMoniker interface, 396
IPersistPropertyBag interface, 396
IPersistStorage interface, 396, 565-566
IPersistStream interface, 395
IPersistStreamInit interface, 395
IPropertyPage interface, 536
IPropertyPageSite interface, 536
IProvideClassInfo2Impl interface, 651
ISAPI extensions (Internet Server Application Programming Interface), 936

CMembrAppExtension example, 954

CHttpServer object, 955
debug mode, 955-956
form submission, 959
GET/POST request handling, 957-958
handler method, 960-961, 967-968
OnParseError override, 962-963
parse map, 960, 964-965
running with IIS (Internet Information Server), 956-957

CMyExtension example

class declaration, 936-937
class implementation, 944-945
ClassWizard override declarations, 937
command handlers, 951-953
CWinApp declaration, 941
EXTENSION_CONTROL_BLOCK structure, 949-950
GetExtensionVersion method, 945
HttpExtensionProc method, 945-951
implementation file, 938-940
object declaration, 944
parse map, 938, 941-944

ISAPI.CPP file (CMyExtension), 945-951
IsArchived method, 920
IsBlocking method, 868
IsCompressed method, 920
IsDirectory method, 920
IsDirty method, 566
IsDots method, 919
IsEmpty method, 747
IsHidden method, 920
IsIdleMessage method, 28
IsKindOf method, 797
IsModified method, 45
IsName method, 389
IsNormal method, 920
IsolationLevel property (ADOConnection class), 716
IsReadOnly method, 919
IsRectEmpty method, 175
IsRectNull method, 175
IsResultExpected method, 24
IsSerializable method, 17
IsSystem method, 920
IsTemporary method, 920
IStorage interface, 563-564
IStream interface, 565, 779
ItemHasChildren method, 123
iterating through collections, 841-843
ITypeInfointerface, 389
ITypeLib interface, 389
IUnknown interface, 377-379

AddRef method, 382
QueryInterface method, 380-381
Release method, 382

IWebBrowser2 interface, 819-822
J-K
Java, 466
JScript, 626
keyboard events, 234-236
keyboard messages

focus, 303
handlers, 304-305
virtual key codes, 302

keys (Registry), 1163

creating, 1168, 1171-1172
deleting, 1172-1174
HKEY_CLASSES_ROOT, 1164
HKEY_CURRENT_CONFIG, 1164
HKEY_CURRENT_USER, 1164
HKEY_DYN_DATA, 1164
HKEY_LOCAL_MACHINE, 1164
HKEY_USERS, 1164

keywords. See also statements

declspec, 1182, 1186
finally, 790-792
try, 790-792

KEY_ALL_ACCESS option (CreateKey function), 1171
KEY_CREATE_LINK option (CreateKey function), 1172
KEY_CREATE_SUBKEY option (CreateKey function), 1172
KEY_ENUMERATE_SUB_KEYS option (CreateKey function), 1172
KEY_EXECUTE option (CreateKey function), 1172
KEY_NOTIFY option (CreateKey function), 1172
KEY_QUERY_VALUE option (CreateKey function), 1172
KEY_READ option (CreateKey function), 1172
KEY_SET_VALUE option (CreateKey function), 1172
KEY_WRITE option (CreateKey function), 1172
L
late binding, 389, 634-635
latency, 1132
latency (blits), 1093
launching links, 236-237
LCID lcid argument

GetIDsOfNames method, 469
Invoke method, 470

lfCharSet member (LOGFONT structure), 190
lfClipPrecision member (LOGFONT structure), 190
lfEscapement member (LOGFONT structure), 190
lfFaceName member (LOGFONT structure), 190
lfHeight member (LOGFONT structure), 189
lfItalic member (LOGFONT structure), 190
lfOrientation member (LOGFONT structure), 190
lfOutPrecision member (LOGFONT structure), 190
lfPitchAndFamily member (LOGFONT structure), 190
lfQuality member (LOGFONT structure), 190
lfStrikeOut member (LOGFONT structure), 190
lfUnderline member (LOGFONT structure), 190
lfWeight member (LOGFONT structure), 190
lfWidth member (LOGFONT structure), 189
libraries

Active Template Library, see ATL
dynamic link libraries, see DLLS
initializing

AfxOleInit function, 418-419
AfxOleInitModule function, 419

type libraries

accessing, 433
defined, 388, 635

licenses

ActiveX Scripting engine, 629
verifying, 420

light, 1064-1065

ambient, 1027, 1066-1067
diffuse, 1027, 1067
enabling lighting state, 1065
sources, 1065-1066
specular, 1027, 1067-1068

LimitText method, 144
line output methods (CDC class), 152
linear fog effects (OpenGL), 1075
LINEBEARERMODE_SPEECH mode (TAPI), 1010
LINEDEVCAPS structure, 1009-1011
lineDrop method, 991, 1018
LineFromChar method, 142
lineGetDevCaps method, 1007-1009
lineGetID method, 1016-1017
LineIndex method, 142
lineInitialize method, 1003-1004
lineInitializeEx method, 1004-1005
LineLength method, 142
lineMakeCall method, 1012-1013
lineNegotiateAPIVersion method, 1005-1007, 1012
lineOpen method, 1011-1012
lines (graphical)

CDC class, 170

LineTo method, 171
MoveTo method, 171
PolyLine method, 172-174

drawing, 170-172

lines (TAPI), initializing, 1002

lineInitialize method, 1003-1004
lineInitializeEx method, 1004-1005

LineScroll method, 142
lineShutdown method, 1018-1019
LineTo method, 171
lineTranslateAddress method, 1014
LINETRANSLATEOUTPUT structure, 1014
linked data, 439
links, hyperlink control, 225-227

cursor, controlling, 231-232
font processing, 228-229
implementation strategy, 227-228
keyboard input, 234-236
links, launching, 236-237
mouse input, 232-234
painting routines, 229-230

list box control, 61
list control, 63
List view, 111
list view controls, 110

adding items to, 119
creating, 116-117
image lists, 113-114
implementing

columns, 117-118
image lists, attaching, 117

items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

Listen method, 858
listings

ADO (Active Data Objects)

adding records code, 713
data binding, 708-709
deleting records code, 714
editing records code, 713
initializing code, 709-711
searching records code, 712
source file code, 714

AfxGetApp function, 242
automatic frame startup, removing, 297
BITMAP1 application (bitmap resources)

BlitBitmap method, 208-209
CMainWnd class, 207

BSTR allocation/deallocation, 595-596
C++ exceptions

CException class, 796-797
example, 793
throwing with automatic variables, 795
throwing with heap variables, 795

CAppException class

example, 810
header file, 808
implementation, 809

CBookRecordset

class definition, 671
constructor, 672
DoFieldExchange method, 673
GetDefaultConnect/GetDefaltSQL methods, 672

CBooks class, 691-692
CBooksAccessor class, 690
CByteArray class

definition, 743-744
SetSize method, 745-746

CClientDC class, 156
CDaoFieldInfo structure, 682
CDatabase class, 667
CDocManager declaration, 281-282
CDocument::OnFileSendMail method, 976-979
CFile class, 761-764
CFileDialog class

DoModal implementation, 770-771
tagOFN structure, 772

CFileStatus structure, 761
CHARFORMAT structure, 138, 146
club.htm form, 958-960

final HTML, 966
radio button, 961

CMainFrame class, OnFileOpen method, 774-775
CMapStringToString hashing implementation, 748
CMembrAppExtension

CHttpServer object, 955
final handler, 967-968
HandleApp to handle radioButton, 964-965
handler method, 960-961
OnParseError override, 962-963

CMyExtension

class declaration, 936-937
ClassWizard override declarations, 937
CMyExtension declaration, 944
CMyExtension implementation, 945
CWinApp declaration, 941
default command handler, 951-952
EXTENSION_CONTROL_BLOCK structure, 949-950
HttpExtensionProc method, 945-951
implementation file, 938-940
parse map, 938, 941

Color Selection dialog box, 75
command-line handling code, 257
control variable creation, 69
CPaintCDC class, 154
CRowset class

Delete method, 704
Insert method, 703
MoveNext method, 701
Update method, 703-704

CSingleDocTemplate class, 279
CSockDlg application

include statements, 875
OnAccept message handler, 875, 878
OnBclose message handler, 883
OnBconnect message handler, 877
OnBsend message handler, 880-881
OnClose message handler, 882-883
OnConnect message handler, 878
OnInitDialog message handler, 876
OnReceive message handler, 881
OnRType message handler, 873
SetParent message handler, 874

CStdioFile class

MFC_CSTR_KLUDGE macro, 768
ReadString implementation, 766-767

CString class

concatenation operator, 736
CStringData structure, 734-735
expanded declaration, 733
Find method, 737
protected data member, 732
ReverseFind method, 738
SplitPartsString utility, 738-740

CWave class

Wave.cpp source code file, 1135-1139
Wave.h header file, 1134-1135

CWinApp class

InitInstance method, 296
m_hPrevInstance data member, 246-247
Run method, 244

CWindowDC class, 157
DirectDraw

copying bitmaps, 1106
driver enumeration, 1084-1085
loading bitmaps, 1105
palette creation, 1107-1108
releasing objects, 1115-1116
reloading bitmaps, 1110-1111
repalettization, 1109-1110
secondary surface creation, 1103-1104
video mode enumeration, 1088
windowed Blt method, 1111
WM_PAINT handler, 1111

DocNavigator application

anchor retrieval, 847-848
anchor scrolling, 849-850
tree view anchor selection, 848

document/frame creation, 283-284
DoTextSystem method, 187-189
drawing lines, 172
Ellipse method, 181-182
event handlers, creating, 71
exceptions

example, 784-785
macros, 812

exporting from DLLs (dynamic link libraries)

classes, 1185
destructors, 1189-1190
include files, 1190-1191
member by member, 1186-1187
MFC-generated data, 1188

File Open dialog box, 74
fonts

creating, 191-192
Font Selection dialog box, 76

FTP (File Transfer Protocol) client application

LoadListOfFiles method, 930
OnBclose method, 928
OnBconnect method, 928-929
OnBgetfile method, 931-932
OnBserdir method, 931
OnInitDialog method, 927

goto statements, 783-784
HTML (Hypertect Transfer Protocol) titles, changing dynamically, 830-831
ICheckBook interface, 379
IDispatch interface, 391-392
idle processing

OnIdle method, 267
WN_CICKIDLE message, 268

if-then-else statements, nesting, 782-783
initialization

member variables, 66
OnInitDialog method, 67

InitInstance method

3D dialog support, 254
additional document types, 255
automation support, 253
dialog application, 250
MDI (multiple document interface) application, 251-252
SDI (single document interface) application, 251

interfaces

controls, 546-547
IDL (Interface Definition Language), 487-488
ODL (Object Definition Language), 489-490

Investment Wizard

CInvestmentWiz class declaration, 339
CInvestmentWiz class implementation, 339-340
CInvestWizPage1 class declaration, 334
CInvestWizPage1 class implementation, 334-335
CInvestWizPage2 class declaration, 336
CInvestWizPage2 class implementation, 336-337
CInvestWizPage3 class declaration, 337
CInvestWizPage3 class implementation, 338
resource identifiers, 330-331
resources, 331-333

list control, adding items to, 119
LOGFONT structure, 189
MainFrm class definition, 292-293
menus

floating pop-up menus, 314
hiding/displaying, 322

message maps

comment blocks, 265
example, 264

message routing

PreTranslateMessage method, 260-262
traditional message loop pseudocode, 259

MFCServer application

MFCServer.cpp, 610-615
MFCServerTest’s OnInitDialog member, 621-622
proxy/stub export definition file, 620
proxy/stub makefile, 619

multiple-page documents, printing

OnPrepareDC method, 364-365
OnPreparePrinting method, 363

name mangling, 1184
objects, creating, 392
OnFileNew handler, 298
OnKeyDown method, 304-305
OnLButtonDown method, 309
OpenGL

3D cube model, 1055-1056
DIB (device-independent bitmap) to OpenGL color mapping, 1070-1071
GLScene’s solid cube display list, 1061-1062
OnDraw method, 1053-1054
PIXELFORMATDESCRIPTOR structure, 1040-1041
proportional viewport, 1050
rendering cube display list, 1063
rendering texture, 1072
view destruction, 1047
window style bits, 1043
WM_CREATE handler, 1044-1045
WM_ERASEBKGND handler, 1051
WM_SIZE handler, 1048

page jobs, stopping

OnPrepareDC method, 368
OnPrint method, 368-369

page numbers, printing

OnPrint method, 367
PrintPageFooter method, 366

PARAFORMAT structure, 139-140
PolyBezier method, 184
PolyLine method code, 173-174
Printer Selection dialog box, 76-77
program execution sequence, 243
Projection application

Projector.rc resource script, 1124-1125
ProjectorDlg.cpp source code file, 1128-1130
ProjectorDlg.h header file, 1126-1127
Resource.h header file, 1123

records

deleting, 676
forward scan, 675
updating, 676

RegSamp application

OnCreateSubKey function, 1169-1171
OnDeleteSubKey function, 1173-1176

SAFEARRAYs, 406
scripting

IActiveScript/IActiveScriptParse interfaces, 633
IActiveScriptSite/IActiveScriptSiteWindow interfaces, 630-632

Shaper application

CShaperView message map, 357
keyboard accelerator resource definition, 356
menu resource definition, 354-355
OnDraw method, 359
OnPrint method, 360
OnUpdate method, 358-359
PrintPageHeader method, 361
toolbar resource definition, 355-356

slider controls, resizing, 104
splitter window, 341
status bars

help message string resource definitions, 320
keyboard status indicator string resource definitions, 320
OnCreate method, 321

structured exceptions

example, 787
nesting, 789
try/finally block, 791-792

SwitchViews method, 294-295
tab notification message handler, 130
tables, viewing layout of, 681
TAPI (Telephony API)

Assisted Telephony, 1000
callback procedure, 1015-1016
LINEDEVCAPS structure, 1010-1011
lineDrop method, 1018
lineGetDevCaps method, 1008
lineGetID method, 1016-1017
lineInitialize method, 1003
lineInitializeEx method, 1004
lineMakeCall method, 1012-1013
lineNegotiatedAPIVersion method, 1006-1007
lineOpen method, 1011
lineShutdown method, 1019

text editor

document-is-dirty event, 650
get_Document method, 645
IDispatch pointer, 647-648
object initialization, 648-649
text selection object definition, 642-643

TEXTMETRIC structure, 186
toolbars

OnCreate method, 317-318
resource definitions, 317

ToolTips, 72

help message string resource definitions, 324
OnCreate message handler, 323

UNL_EdView class

definition, 288-289
implementation, 290-291

UNL_MultiEd application

adding participants, 753
CXEvent, CXParticipant, and CXEventRecord definitions, 750-753
CXEventRecorder LoadEvents function, 777-778
events file, 776
removing participants, 754

UNL_Single.cpp InitInstance routine, 279
VARIANT datatype

discriminated union, 601
discriminators, 601-602

vector cross-product calculations, 1031-1032
War application

MainFrame.cpp source code file, 1147-1153
MainFrame.h header file, 1146-1147
Resource.h header file, 1144-1145
War.rc resource script, 1145

Webbrowser2.h declaration file, 820-822
WinInit sample application

CMyInternetSession class definition, 904
CMyInternetSession.CPP include section, 909
OnBurl method, 908-909
OnCancel method, 907
OnInitDialog method, 907
OnStatusCallback method, 904-906
SetParentDialog method, 904
UpdateStatus method, 908

WIZARD1.EXE application

CIntroPage class interface, 1210
CPage1 class interface, 1213
DoDataExchange method, 1214
OnInitDialog method, 1210
OnPaint method, 1211-1212
OnFileRunWizard method, 1219-1220
OnWizardNext method, 1215-1216
OnWizardNext method, 1218
OnSetActive method, 1219

lists

collections, 746-747
image lists, 107-108

creating, 109-110
methods, 108-109

list box controls, 61
list controls, 63
list view controls

adding items to, 119
creating, 116-117
image lists, 113-114
implementing, 117-118
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

OpenGL display lists

declaring, 1060
defined, 1060
example, 1061-1062
memory allocation, 1064
rendering, 1062-1063
troubleshooting, 1064

Load method, 566
LoadBitmap method, 200, 1104
LoadEvents method, 777-778
LoadImage method, 204-205
loading

bitmaps, 1103-1105
DLLs (dynamic link libraries)

AfxLoadLibrary function, 1192
load addresses, 1195-1197

LoadLibrary function, 979
LoadListOfFile method, 929-930
LoadMappedBitmap method, 200
LoadMenu method, 314
LoadOEMBitmap method, 200
LoadStdProfileSettings method, 32, 255
LoadString method, 1212
LoadToolBar method, 318
local servers, 383
LocaleID property, 532
LocalServer subkey (COM objects), 540
LocalServer32 subkey (COM objects), 540
location transparency, 512
locators

creating, 922
types, 923

Lock method, 616
LockRegion method, 565
LockServer method, 385
lockViolation value (CFileException::m_cause), 801
LOGFONT structure

code listing, 189
members, 189-190

logical coordinate systems (GDI), 165-167

MM ANISOTROPIC, 166
MM HIENGLISH, 166
MM HIMETRIC, 166
MM ISOTROPIC, 166
MM LOENGLISH, 166
MM LOMETRIC, 166
MM TEXT, 166
MM TWIPS, 167

logical devices, 148
logical fonts

creating, 191-192
defined, 189

lpFiles data member (MapiMessage structure), 974
LPHLINEAPP parameter (lineInitialize method), 1003
lpnTabStopPositions parameter (TabbedTextOut method), 194
LPOLSTR* argument (GetIDsOfNames method), 469
lpOriginator data member (MapiMessage structure), 974
lpRecips data member (MapiMessage structure), 974
LPSTR parameter (WinMain function), 10
lpszBitmapID parameter (CImageList control), 110
lpszConversationID data member (MapiMessage structure), 974
lpszDateReceived data member (MapiMessage structure), 974
lpszFileName data member (MapiFileDesc structure), 975
lpszFileType data member (MapiFileDesc structure), 975
lpszMessageType data member (MapiMessage structure), 974
lpszNoteText data member (MapiMessage structure), 974
lpszPathName data member (MapiFileDesc structure), 975
lpszSubject data member (MapiMessage structure), 974
LR_CREATEDIBSECTION flag (LoadImage method), 205
LR_DEFAULTCOLOR flag (LoadImage method), 205
LR_DEFAULTSIZE flag (LoadImage method), 205
LR_LOADFROMFILE flag (LoadImage method), 205
LR_LOADMAP3DCOLORS flag (LoadImage method), 205
LR_LOADTRANSPARENT flag (LoadImage method), 205
LR_MONOCHROME flag (LoadImage method), 205
LR_SHARED flag (LoadImage method), 205
LVN_BEGINDRAG message map entry, 116
LVN_BEGINLABELEDIT message map entry, 116
LVN_BEGINRDRAG message map entry, 116
LVN_COLUMNCLICK message map entry, 116
LVN_DELETEALLITEMS message map entry, 116
LVN_DELETEITEM message map entry, 116
LVN_ENDLABELEDIT message map entry, 116
LVN_GETDISPINFO message map entry, 116
LVN_INSERTITEM message map entry, 116
LVN_ITEMCHANGED message map entry, 116
LVN_ITEMCHANGING message map entry, 116
LVN_KEYDOWN message map entry, 116
LVN_PEN message map entry, 116
LVN_SETDISPINFO message map entry, 116
LVS_ALIGNLEFT style (list view control), 112
LVS_ALIGNTOP style (list view control), 112
LVS_AUTOARRANGE style (list view control), 112
LVS_EDITLABELS style (list view control), 112
LVS_ICON style (list view control), 112
LVS_LIST style (list view control), 112
LVS_NOCOLUMNHEADER style (list view control), 112
LVS_NOLABELWRAP style (list view control), 112
LVS_NOSCROLL style (list view control), 112
LVS_NOSORTHEADER style (list view control), 112
LVS_OWNERDRAWFIXED style (list view control), 112
LVS_REPORT style (list view control), 113
LVS_SHAREIMAGELISTS style (list view control), 113
LVS_SINGLESEL style (list view control), 113
LVS_SMALLICON style (list view control), 113
LVS_SORTASCENDING style (list view control), 113
LVS_SORTDESCENDING style (list view control), 113
LV_COLUMN structure, 118
M
macros

BEGIN_CONNECTION_MAP, 431
BEGIN_CONNECTION_PART, 430
BEGIN_DISPATCH_MAP, 426
BEGIN_EVENTSINK_MAP, 429
BEGIN_EVENT_MAP, 428
BEGIN_MESSAGE_MAP, 22, 264
BEGIN_OLEFACTORY, 421
BEGIN_PARSE_MAP, 942
BEGIN_PROPPAGEIDS, 433
CONNECTION_IID, 431
CONNECTION_PART, 431
DDP_ functions, 432
DDX_ functions, 425
DECLARE_CONNECTION_MAP, 431
DECLARE_DISPATCH_MAP, 426
DECLARE_DYNAMIC, 15
DECLARE_DYNCREATE, 16
DECLARE_EVENTSINK_MAP, 429
DECLARE_EVENT_MAP, 428
DECLARE_MESSAGE_MAP, 21, 265
DECLARE_OLECREATE, 421
DECLARE_OLECREATE_EX, 421
DECLARE_OLETYPELIB, 433
DECLARE_PROPPAGEIDS, 433
DECLARE_SERIAL, 17
DEFAULT_PARSE_COMMAND, 959
DISP_DEFVALUE, 426
DISP_FUNCTION, 426
DISP_PROPERTY, 427
DISP_PROPERTY_EX, 427
DISP_PROPERTY_NOTIFY, 427
DISP_PROPERTY_PARAM, 427
DYNAMIC_DOWNCAST, 16
END_CONNECTION_MAP, 431
END_CONNECTION_PART, 431
END_DISPATCH_MAP, 426
END_EVENTSINK_MAP, 429
END_EVENT_MAP, 428
END_MESSAGE_MAP, 22, 265
END_OLEFACTORY, 421
END_PARSE_MAP, 942
END_PROPPAGEIDS, 433
EVENT_CUSTOM, 428
EVENT_CUSTOM_ID, 428
exception macros, 812-813
ID_EDIT_UNDO, 325
IMPLEMENT_DYNAMIC, 15
IMPLEMENT_DYNCREATE, 16
IMPLEMENT_OLECREATE_EX, 421
IMPLEMENT_OLETYPELIB, 433
IMPLEMENT_SERIAL, 17
MFC_CSTR_KLUDGE, 767-768
ON_EVENT, 430
ON_EVENT_RANGE, 430
ON_EVENT_REFLECT, 430
ON_NOTIFY, 83-84
ON_NOTIFY_RANGE, 84-85
ON_OLECMD, 421-422
ON_OLEVERB, 429
ON_PARSE_COMMAND, 942, 959
ON_PARSE_COMMAND_PARAMS, 942-944
ON_PROPNOTIFY, 430
ON_PROPNOTIFY_RANGE, 430
ON_PROPNOTIFY_REFLECT, 430
ON_STDOLEVERB, 429
ON_UPDATE_COMMAND_UI, 325
PROPPAGEID, 433
PX_ functions, 423-424
RUNTIME_CLASS, 280
STATIC_DOWNCAST, 16
T2OLE, 597
USES_CONVERSION, 597

Mail API. See MAPI (Messaging Application Programming Interface)
MainFrame.h header file (War application), 1146-1147
MakeProcInstance method, 1003
MakeSymbolsExternal.h file, 1190
MakeSymbolsInternal.h file, 1190
mangled names, 1183-1185
MAPI (Messaging Application Programming Interface), 970

CDocument class, 975-976

OnFileSendMail method, 976-981
OnUpdateFileSendMail method, 976

clients, 971
CMC (Common Messaging Calls), 972-973
MAPI1.EXE sample program, 981-984
MapiFileDesc structure, 974-975
MapiMessage structure, 973-974
Simple MAPI, 971-972
support for, 975

MAPI1.EXE sample program, 981-984
MAPIAddress function, 972
MAPIDeleteMail function, 972
MAPIDetails function, 972
MAPIFileDesc structure, 974-975
MAPIFindNext function, 972
MAPIFreeBuffer function, 972
MAPILogoff function, 972
MAPILogon function, 972
MAPIMessage structure, 973-974
MAPIReadMail function, 972
MAPIResolveName function, 972
MAPISaveMail function, 972
MAPISendDocuments function, 972
MAPISendMail function, 972
mapping methods (CDC class), 152
mapping modes, 286

MM ANISOTROPIC, 166
MM HIENGLISH, 166
MM HIMETRIC, 166
MM ISOTROPIC, 166
MM LOENGLISH, 166
MM LOMETRIC, 166
MM TEXT, 166
MM TWIPS, 167
MM_LOENGLISH, 353
MM_TEXT, 352-353

maps (message)

collections, 747-749
comment blocks, 265
connection maps, 430-431
defined, 262
dispatch maps

automation properties, 427
declaring, 426

efficiency of, 265-266
event maps, 427

declaring, 428
event-mapping macros, 428
message-mapping verbs, 428-429

example, 264
macros, 264-265
sink maps

declaring, 429
event-mapping macros, 429-430

marshalling, 386-388, 474, 600

defined, 387
proxy/stub relationship, 387
standard marshalers, 388

material properties (graphics), 1027

color tracking, 1069
setting, 1068-1069

matrices, 1030, 1037-1038
MDI (Multiple Document Interface) applications, 52, 277, 295-296

data management, 298-299
document templates, 296-298
initialization, 251-252

Media Player control, 1119-1120

CMediaPlayer class, 1121-1122
Projection application, 1122

Projector.rc resource script, 1124-1125
ProjectorDlg.cpp source code file, 1128-1130
ProjectorDlg.h header file, 1126-1127
Resource.h header file, 1123

supported media formats, 1119-1120

member variables, initializing, 66
memory

allocating, 1064
deallocating, 1064
smart pointers, 591-593
virtual, 1196

menus (CMenu class), 310-311

adding items to, 311-312
floating pop-up menus, 313-314
pointers, 311

MERGECOPY raster operation, 196
MERGEPAINT raster operation, 196
message handlers

OnAccept, 862, 875, 878
OnActivateFrame, 44
OnActivateView, 44
OnAmbientProperty, 573
OnApply, 1201
OnBclose, 883
OnBconnect, 877
OnBeginPrinting, 348-349
OnBsend, 880-881
OnCancel, 907, 1201
OnClose, 567, 862, 882-883
OnCloseDocument, 47
OnCmdMsg, 22
OnConnect, 862, 878
OnCreate

status bars, 321
toolbars, 317-318
ToolTips, 323

OnCreateSubKey, 1169-1171
OnDataChange, 567
OnDeleteSubKey, 1173-1176
OnDraw, 43, 359
OnDraw, 550-551, 1053-1054
OnEndPrinting, 348-349
OnEndPrintPreview, 348
OnFileNew, 298
OnFileOpen, 773-775, 826
OnFileRunWizard, 1219-1220
OnFileSendMail, 976-981
OnFinalRelease, 24
OnHide, 458
OnIdle, 28
OnIdle, 245, 266-268
OnInitDialog, 67, 621-622, 876, 906-907, 1210
OnInPlaceActivate, 567
OnInPlaceDeactivate, 568
OnKeyDown, 304-305
OnKillActive, 329, 1201
OnLButton, 308-309
OnMessagePending, 863
OnMouseMove, 308
OnNewDocument, 47, 501
OnNotify, 83
OnOK, 1201
OnOpen, 458
OnOpenDocument, 47
OnOutOfBandData, 862
OnPaint, 1211
OnParseError, 962-963
OnPosRectChange, 568
OnPrepareDC, 348-349, 364-368
OnPreparePrinting, 348, 363
OnPrint, 348-349, 360, 367-369
OnQueryCancel, 1201
OnRButtonUp, 313-314
OnReceive, 863, 881
OnRename, 567
OnRequestPositionChange, 460-461
OnReset, 1202
OnRType, 873
OnSave, 567
OnSaveDocument, 47
OnSend, 863
OnSetActive, 329, 1202, 1218-1219
OnShow, 458
OnShowWindow, 566
OnStatusCallback, 897, 904-906
OnTimer, 1154
OnUIActivate, 567
OnUIDeactivate, 568
OnUpdate, 43, 358
OnUpdateEditUndo, 325
OnUpdateFileSendMail, 976
OnViewChange, 567
OnWizardBack, 329, 1202-1204
OnWizardFinish, 329, 1202
OnWizardFinished, 1205
OnWizardNext, 329, 1202, 1205, 1214-1216

message loops, 11-12
message maps. See maps
message procedures, 215
messages

command, 262-263
control notification, 262
handling, 263-264
keyboard messages

focus, 303
handlers, 304-305
virtual key codes, 302
WM_KEYDOWN, 234
WM_KEYUP, 234

mouse messages, 305-307

handlers, 308-309
WM_MOUSEACTIVATE, 307
WM_MOUSEHOVER, 307
WM_MOUSELEAVE, 307
WM_MOUSEMOVE, 307
WM_MOUSEWHEEL, 308
WM_XBUTTONDBLCLK, 308
WM_XBUTTONDOWN, 308
WM_XBUTTONUP, 308

notifications, 239

animation controls, 133
common controls, 81-85
list view controls, 116
tab controls, 126-127
tree view controls, 121

receiving, 860-861
routing, 19, 259-260

classes, 260-261
message maps, 20-22
OnCmdMsg method, 22
PreTranslateMessage method, 261-262
sockets, 859-860

wizard notification messages

PSN_WIZBACK, 1204
PSN_WIZFINISH, 1205
PSN_WIZNEXT, 1205

WM_CANCELMODE, 234
WM_CHAR, 234
WM_ERASEBKGND, 1051
WM_GETDLGCODE, 235
WM_KICKIDLE, 268-269
WM_NOTIFY, 83
WM_PAINT, 1111
WM_PALETTECHANGED, 1091-1092
WM_QUERYNEWPALETTE, 1092-1093
WM_SETCURSOR, 231
WM_SETFONT, 228

Messaging Application Programming Interface. See MAPI
messaging-aware applications, 971
messaging-based applications, 971
messaging-enabled applications, 971
metafile methods (CDC class), 152
metafiles, 148
methods, 533. See also functions; message handlers

Abort, 694-695, 900
Accept, 858-859
ActivateMe, 569
Add, 108
AddBar, 318
AddBindEntry, 700-701
AddDocTemplate, 31, 279
AddDocument, 279
AddHead, 747
AddNew, 674, 720
AddPage, 328, 340, 1200
AddParameterEntry, 700-701
AddRef, 382, 648
AddRequestHeaders, 913
AddTail, 747
AddToRecentFileList, 32
AddView, 45-46
AdjustRect, 127
AllocBuffer, 734
Append, 683
AppendMenu, 311-312
AssertValid, 14
AsyncSelect, 863-864
Attach, 37, 108, 478-483
BeginDrag, 108
BeginModalState, 43
BeginTrans, 668, 679, 716
BeginWaitCursor, 22
BitBlt, 201-202
BlitBitmap, 208
Blt, 1095-1096, 1111
BottomRight, 174
BuildSharedMenu, 461-462
CalcNumPages, 363
CalculatePoints, 753
CancelBlockingCall, 868
CancelToClose, 1201
CancelToolTips, 71
CancelUpdate, 677
CanCloseFrame, 47
CanInPlaceActivate, 567
CanPaste, 144
CanTransact, 667
CanUndo, 143
CentPoint, 174
CenterWindow, 39
CleanupDirectSound, 1147
Clear, 142
ClearSel, 100
ClearTics, 100
ClientToScreen, 314
Clone, 565
Close, 666-667, 760, 861, 899

ADOConnection class, 714-715
ADORecordset class, 718
CAccessorRowset class, 706
CDaoDatabase class, 679
CDaoQueryDef class, 683
CDaoTableDef class, 681
CDaoWorkspace class, 678
CDataSource class, 692
CRowset class, 704
CSession class, 693-694

CoCreateInstance, 400-401, 621
CoCreateInstanceEx, 401
CoGetClassObject, 385
CombineRgn, 164, 178-179
Commit, 564-565, 694-695
CommitTrans, 668, 679, 716
Compare, 738
ComputeFacePoint, 219-220
Connect, 858
ConnectTemplate, 257
Construct, 1200
ContinueModal, 39
Contruct, 329
Copy, 144
CopyDDBitmap, 1106, 1110
CopyRect, 174
CopyRgn, 164, 178
CopyTo, 564-565
Create, 856, 1200

CCommand class, 707
CDaoQueryDef class, 683
CDaoWorkspace class, 678
CWnd class, 36

CreateAccessor, 700
CreateBitmap, 200
CreateBitmapIndirect, 200
CreateBrushIndirect, 161
CreateChildControls, 101-103
CreateClipper, 1101
CreateCommand, 707
CreateCompatibleBitmap, 200
CreateControl, 36
CreateDIBPatternBrush, 161
CreateDirectory, 916
CreateDiscardableBitmap, 200
CreateDispatch, 493
CreateDragImage, 122
CreateEllipticRgn, 164, 178
CreateEllipticRgnIndirect, 164, 178
CreateEx, 36
CreateFont, 162, 190
CreateFontIndirect, 162, 190
CreateFromData, 164, 178
CreateFromPath, 164, 178
CreateHatchBrush, 161
CreateInstance, 385
CreateIoCompletionPort, 1005
CreateKey, 1171
CreateLocator, 922
CreateNewDocument, 283
CreateNewFrame, 283
CreateParameter, 722-723
CreateParameterAccessor, 700
CreatePatternBrush, 161
CreatePen, 160
CreatePenIndirect, 160
CreatePointFont, 162, 191
CreatePointFontIndirect, 162, 191
CreatePolygonRgn, 164, 178
CreatePolyPolygonRgn, 164, 178
CreateRectRgn, 164, 178
CreateRectRgnIndirect, 164, 178
CreateRoundRectRgn, 164, 178
CreateSolidBrush, 161
CreateStatic, 341
CreateStorage, 564
CreateStream, 564
CreateSurface, 1094, 1098
CreateSysColorBrush, 161
CreateThread, 25
CreateView, 341
Cut, 144
DeactivateAndUndo, 568
DeflateRect, 174
Delete, 676-677

ADORecordset class, 720
CException class, 797-798
CRowset class, 702-704

DeleteAllItems, 122, 127
DeleteContents, 46
DeleteImageList, 108
DeleteItem, 122, 127
DeleteMenu, 311
DescribePixelFormat, 1046
DestroyElement, 564
DestroySharedMenu, 462
destructors, 1189-1190
Detach, 37, 108
DetachDispatch, 494
DirectDrawCreate, 1082, 1086
DirectDrawEnumerate, 1084
DiscardUndoState, 568
DisplayBand, 144
DllRegisterServer, 542
DllUnregisterServer, 542
DoBezier, 195
DockControlBar, 319
DoDataExchange, 73, 339, 1214
DoEllipses, 180, 195
DoFieldExchange, 673
DoLines, 195
DoMetafile, 195
DoModal, 327-328, 770-771, 1201, 1204
DoPixels, 195
DoPoints, 195
DoPolygon, 180, 195
DoPolyLine, 195
DoPreparePrinting, 348
DoPropExchange, 423
DoRects, 195
DoRegions, 195
DoRegionsDifference, 195
DoRegionsIntersect, 195
DoRegionsUnion, 195
DoRoundRects, 195
DoTextArial, 195
DoTextRoman, 195
DoTextSystem, 187-189, 195
DragAcceptFiles, 256
DragEnter, 108
DragLeave, 108
DragMove, 108
DragShowNolock, 108
Draw, 108
DrawFacePoint, 220-221
DrawFocusRect, 229-230
DrawItem, 127
DrawText, 193, 229
Dump, 15
Edit, 675-676
EditLabel, 122
Ellipse, 180-182
EmptyUndoBuffer, 143
Enable, 325
EnableAutomation, 23-24
EnableModeless, 568
EnableShellOpen, 32
EnableShellOpen, 256
EnableStatusCallback, 897
EnableToolTips, 39, 71
EndDialog, 1201
EndDrag, 108
EndModalLoop, 39
EndModalState, 43
EndRequest, 914
EndWaitCursor, 22
EnsureVisible, 122
EnumDisplayModes, 1087
EnumElements, 564
EqualRect, 174
EqualRgn, 178, 164
ErrnoToException, 802
Exec, 569
Execute

ADOCommand class, 722
ADOConnection class, 716-717
CDaoDatabase class, 680
CDaoQueryDef class, 684

ExecuteDlgInit, 37
ExecuteSQL, 667
ExitInstance, 26, 244, 616
Expand, 122
ExtractIcon, 108
FContinue, 569
FContinuePrinting, 569
FillRect, 176
Find, 737
FindFile, 918-920
FindName, 389
FindNextFile, 918
FindText, 144
Fire_IsDirty, 650
Flip, 1100
Flush, 899
FormatContents, 216
FormatRange, 144
FreeRecordMemory, 706
FromHandle, 36, 178, 200

CBrush class, 161
CFont class, 162
CPen class, 160
CRgn class, 164

FromHandlePermanent, 36
FromIDispatch, 24
GetActiveDocument, 42
GetActiveFrame, 42
GetActiveIndex, 1201
GetActivePage, 1201
GetActiveView, 42
GetAppRegistryKey, 30
GetAt, 747
GetBitmap, 200
GetBitmapBits, 200
GetBitmapDimension, 200
GetBkColor, 109
GetChannelRect, 99
GetCharPos, 144
GetChildItem, 122
GetColumnCount, 696
GetColumnName, 696
GetColumnType, 696-697
GetContainer, 566
GetContext, 899-901
GetControlUnknown, 573
GetCookie, 896-897
GetCount, 122, 747
GetCreationTime, 919
GetCurFocus, 127
GetCurrentDirectory, 916
GetCurrentDirectoryAsURL, 916
GetCurrentPosition, 1122
GetCurSel, 127
GetDefaultCharFormat, 143
GetDefaultConnect, 672
GetDefaultSQL, 672
GetDlgItem, 1212
GetDocTemplate, 45
GetDocument, 44, 823
GetDragImage, 109
GetDropHilightItem, 122
GetEditControl, 122
GetEditCtrl, 288
GetErrorCount, 807
GetErrorMessage, 798
GetEventMask, 144
GetExtensionVersion, 945
GetExtLogPen, 160
GetFieldCount, 682
GetFieldInfo, 682
GetFile, 47, 917
GetFileName, 760, 919
GetFilePath, 760, 919
GetFileTitle, 760, 919
GetFileURL, 919
GetFirstDocTemplatePosition, 31
GetFirstViewPosition, 46
GetFirstVisibleItem, 122
GetFirstVisibleLine, 142
GetFtpConnection, 894-895
GetFuncDesc, 389
GetGopherConnection, 895
GetHead, 747
GetHotKey, 86
GetHtmlDocument, 824, 839
GetHttpConnection, 893-894
GetIDispatch, 24
GetIDsOfNames, 467-470, 495
GetImageCount, 109
GetImageInfo, 109
GetImageList, 122, 127
GetIndent, 122
GetInPlace, 460
GetItem, 122, 127
GetItemCount, 127
GetItemData, 122
GetItemImage, 122
GetItemRect, 122, 127
GetItemState, 122
GetItemText, 122
GetLastAccessTime, 919
GetLastError, 865
GetLastWriteTime, 919
GetLength, 696, 740, 760, 919
GetLimitText, 144
GetLine, 142
GetLineCount, 142
GetLineSize, 99
GetLocatorType, 923
GetLogBrush, 161
GetLogFont, 163
GetLogPen, 160
GetMenu, 311
GetMenuItemCount, 311
GetModify, 144
GetMoniker, 566
GetNext, 747
GetNextDocTemplate, 31
GetNextItem, 122
GetNextResult, 707
GetNextSiblingItem, 122
GetNextView, 46
GetNextVisibleItem, 122
GetNumTics, 99
GetOwner, 38
GetPage, 1201
GetPageCount, 1201
GetPageIndex, 1201
GetPageSize, 99
GetParaFormat, 143
GetParam, 699-700
GetParamCount, 699
GetParameterInfo, 707
GetParamName, 699
GetParamType, 699
GetParentItem, 122
GetPathName, 45
GetPeerName, 865
GetPos, 99
GetPosition, 760
GetPrevSiblingItem, 122
GetPrevVisibleItem, 122
GetProfileBinary, 31
GetProfileInt, 31
GetProfileString, 31
GetProperty, 573, 577
GetRange, 99
GetRangeMax, 99
GetRangeMin, 99
GetRect, 144
GetRegionData, 164, 178
GetRgnBox, 164, 178
GetRoot, 919
GetRootItem, 122
GetRowCount, 127
GetSafeHandle, 109
GetSafeHwnd, 38
GetSectionKey, 30
GetSel, 142
GetSelectedItem, 122
GetSelection, 99
GetSelectionCharFormat, 143
GetSelectionType, 142
GetSelText, 142
GetServerName, 902
GetSession, 901
GetSockName, 866
GetSockOpt, 866
GetSQL, 684
GetStatus, 698, 760
GetStyle, 38
GetSubMenu, 311
GetSystemMetrics, 165
GetTabControl, 1201
GetTail, 747
GetTextLength, 144
GetThreadPriority, 27
GetThumbRect, 99
GetTic, 99
GetTicArray, 99
GetTicPos, 99
GetTitle, 42, 45
GetTooltips, 128
GetTypeAttr, 389
GetTypeInfo, 467, 470
GetTypeInfoCount, 389, 467, 470
GetTypeInfoOfGuid, 389
GetValue, 697-698
GetVarDesc, 389
GetVerb, 915
GetVisibleCount, 122
GetVolume, 1122
GetWindowContext, 567
get_all, 844
get_anchors, 846
get_children, 844
get_document, 843
get_innerHTML, 843
get_innerText, 843-844
get_links, 840
get_outerHTML, 843-844
get_parentElement, 843
get_tagName, 843
GlobalAlloc, 769
HandleApp, 960
HandsOffStorage, 566
Height, 174
HideSelection, 142
HitTest, 122, 128
HttpExtensionProc, 945-951
InflateRect, 174
InitATL, 615
InitCommonControls, 80
InitCommonControlsEx, 80-81
InitDirectSound, 1147
InitDSBuffers, 1147, 1153
InitializeObjects, 648
InitInstance, 26, 244, 250-251, 296, 615

3D dialog support, 254
automation support, 253-254, 257
command-line handling, 257-259
container support, 254
dialog applications, 250-251
document template classes, 255-256
main frame window creation, 256
MDI (multiple document interface) applications, 251-252
Registry usage, 254
rich edit control support, 257
SDI (single document interface) applications, 251

InitNew, 566
InModalState, 43
Insert, 702-703
InsertAfter, 747, 754
InsertBefore, 747, 754
InsertColumn, 118
InsertItem, 123, 128
InsertMenu, 311-312
InsertMenus, 568
IntersectRect, 175
Invoke, 635, 467, 470-471
InvokeHelper, 495, 499, 573, 578
invoking, 402-404
IsArchived, 920
IsBlocking, 868
IsCompressed, 920
IsDirectory, 920
IsDirty, 566
IsDots, 919
IsEmpty, 747
IsHidden, 920
IsIdleMessage, 28
IsKindOf, 797
IsModified, 45
IsName, 389
IsNormal, 920
IsReadOnly, 919
IsRectEmpty, 175
IsRectNull, 175
IsResultExpected, 24
IsSerializable, 17
IsSystem, 920
IsTemporary, 920
ItemHasChildren, 123
LimitText, 144
lineDrop, 991, 1018
LineFromChar, 142
lineGetDevCaps, 1007-1009
lineGetID, 1016-1017
LineIndex, 142
lineInitialize, 1003-1004
lineInitializeEx, 1004-1005
LineLength, 142
lineMakeCall, 1012-1013
lineNegotiateAPIVersion, 1005-1007, 1012
lineOpen, 1011-1012
LineScroll, 142
lineShutdown, 1018-1019
LineTo, 171
lineTranslateAddress, 1014
Listen, 858
Load, 566
LoadBitmap, 200, 1104
LoadEvents, 777-778
LoadImage, 204-205
LoadListOfFile, 929-930
LoadMappedBitmap, 200
LoadMenu, 314
LoadOEMBitmap, 200
LoadStdProfileSettings, 32, 255
LoadString, 1212
LoadToolBar, 318
Lock, 616
LockRegion, 565
LockServer, 385
MakeProcInstance, 1003
ModifyMenu, 311
ModifyStyle, 38
ModifyStyleEx, 38
MoveElementTo, 564
MoveFirst

ADORecordset class, 719-720
CRecordset class, 674
CRowset class, 701

MoveLast

ADORecordset class, 719-720
CRecordset class, 674-675
CRowset class, 701

MoveNext

ADORecordset class, 719-720
CRecordset class, 674-675
CRowset class, 701

MovePrev

CRecordset cls, 674-675
CRowset class, 701

MovePrevious, 719-720
MoveTo, 171
Navigate2, 849
NormalizeRect, 175
Offset, 170
OffsetPos, 105
OffsetRect, 175
OffsetRgn, 164, 179
Open, 760

ADOConnection class, 714-715
ADORecordset class, 718-719
CCommand class, 706
CDaoDatabase class, 679
CDaoQueryDef class, 683
CDaoTableDef class, 681
CDaoWorkspace class, 678
CDataSource class, 692
CSession class, 693-694
CTable class, 708

OpenDocumentFile, 32, 282
OpenEx, 666-667
OpenFile, 917
OpenFromFileName, 693
OpenFromInitializationString, 693
OpenRequest, 910-911
OpenStorage, 564
OpenStream, 564
OpenURL, 892-893
OpenWithPromptFileName, 693
operator, 705
OSErrorToException, 802
ParseCommandLine, 33
Paste, 144
PasteSpecial, 144
Pause, 1122
Play, 1122
PlaySound, 1132-1133
PolyBezier, 183-184
Polygon, 179-180
PolyLine, 172-174
PositionRects, 208
PreCloseFrame, 47
PreCreateWindow, 37
Prepare, 707
PressButton, 1201
PreSubclassWindow, 38
PreTranslate, 28
PreTranslateMessage, 261-262
PrintPageFooter, 366
PrintPageHeader, 360-361
Process, 803
ProcessMessageFilter, 28
ProcessShellCommand, 33
ProcessWndProcException, 28
PtInRect, 175
PtInRegion, 164, 179
PushDefaultStackArgs, 962
PutFile, 916
put_hash, 849-850
put_innerHTML, 843-845
put_innerText, 843-844
put_outerHTML, 845
put_Text, 843
QueryFinished, 364
QueryInfo, 914
QueryInfoStatusCode, 915
QueryInterface, 380-381, 592, 839
QuerySiblings, 1202
QueryStatus, 569
Read, 109, 565, 760, 900
ReadString, 765-767, 900
RecalcLayout, 219
Receive, 860
ReceiveFrom, 861
Rectangle, 176
RectInRegion, 164, 179
RegCloseKey, 30, 1165
RegCreateKey, 1165
RegDeleteKey, 1165
RegDeleteValue, 1165
RegEnumKey, 1165
RegEnumValue, 1165
RegFlushKey, 1165
RegisterAll, 257
RegisterHotKey, 87
RegisterShellFileTypes, 32, 256
RegLoadKey, 1165
RegNotifyChangeKeyValue, 1165
RegOpenKey, 1165
RegQueryInfoKey, 1165
RegSaveKey, 1165
RegServer, 617
Release, 382
ReleaseAttribDC, 152
ReleaseCommand, 707
ReleaseDispatch, 494
ReleaseFile, 47
ReleaseOutputDC, 152
ReLoadDDBitmap, 1109-1110
Remove, 109, 760
RemoveAll, 747
RemoveAt, 754
RemoveDirectory, 916
RemoveHead, 747
RemoveImage, 128
RemoveMenus, 568
RemovePage, 328, 1201
RemoveTail, 747
RemoveView, 45
Rename, 760, 917
RenameElement, 564
RePalettize, 1109
Replace, 109
ReplaceSel, 142
ReportError, 798
ReportSaveLoadException, 47
Requery, 677
RequestNewObjectLayout, 566
RequestResize, 144
Restore, 1107
RestoreDSBuffers, 1147, 1153
RestoreWaitCursor, 22
ResumeThread, 27
ReverseFind, 737-738
Revert, 564-565
Rollback, 668, 679
RollbackTrans, 716
RoundRect, 176-177
Run, 27, 244
RunAutomated, 33
RunEmbedded, 33
RunModalLoop, 39
Save, 566
SaveCompleted, 566
SaveModified, 45
SaveObject, 566
Scroll, 568
Seek, 565, 900
SeekToBegin, 760
SeekToEnd, 760
Select, 123
SelectDropTarget, 123
SelectItem, 123
Send, 859
SendRequest, 914
SendRequestEx, 914
SendTo, 861
Serialize, 18-19, 869
ServiceTypeFromHandle, 899
SetActivePage, 1201
SetActiveView, 42
SetAntenna, 547-548, 586
SetAt, 747
SetAttrib, 152
SetBackgroundColor, 144
SetBarStyle, 323
SetBitmap, 318
SetBitmapBits, 200
SetBitmapDimension, 200
SetBkColor, 109, 193
SetBkMode, 193
SetButtons, 318-319
SetCapture, 232
SetCheck, 325
SetClass, 564
SetCookie, 895
SetCooperativeLevel, 1087
SetCurrentDirectory, 916
SetCurrentPosition, 1122
SetCurSel, 128
SetDefaultCharFormat, 143
SetDragCursorImage, 109
SetElementTimes, 564
SetEventMask, 144
SetFileName, 1122
SetFinishText, 1201, 1205
SetFont, 1212
SetHotKey, 86
SetHWnd, 1101
SetImageList, 123, 128
SetIndent, 123
SetItem, 123, 128
SetItemData, 123
SetItemImage, 123
SetItemSize, 128
SetItemState, 123
SetItemText, 123
SetLength, 760
SetLineSize, 99
SetMaxPage, 364
SetMenu, 568
SetMessageText, 42
SetModified, 1202
SetModifiedFlag, 45
SetModify, 144
SetOptions, 145
SetOutputDC, 152
SetOverlayImage, 109
SetOwner, 38
SetPadding, 128
SetPageSize, 99
SetParaFormat, 143
SetParam, 699-700
SetParameterInfo, 707
SetParent, 874
SetParentDialog, 904
SetPathName, 45
SetPixel, 170
SetPixelFormat, 1046
SetPos, 99, 106
SetProperty, 573, 577
SetRadio, 325
SetRange, 99, 106
SetRangeMax, 99
SetRangeMin, 99
SetReadBufferSize, 901
SetReadOnly, 145
SetRect, 145, 175
SetRectEmpty, 175
SetRectRgn, 164, 179
SetRegistryKey, 30, 249, 1166
SetRop2, 168
SetRows, 705
SetRules, 86
SetScaleToFitSize, 286
SetScrollSizes, 286
SetSel, 142
SetSelection, 99
SetSelectionCharFormat, 143
SetSize, 565, 745-746
SetSockOpt, 867
SetSQL, 684
SetStateBits, 564
SetStatus, 698-699
SetStatusText, 568
SetStep, 106
SetTargetDevice, 145
SetText, 325
SetThreadPriority, 27
SetTic, 99
SetTicFreq, 99
SetTitle, 42, 45
SetTitle, 1201
SetTooltips, 128
SetValue, 697-698
SetViewportExt, 166
SetVolume, 1122
SetWindowExt, 166
SetWindowText, 587
SetWizardButtons, 328, 333, 1201-1203
SetWizardMode, 328, 1201-1203
SetWordCharFormat, 143
SetWriteBufferSize, 901
ShowObject, 566
ShutDown, 861
Size, 175
SortChildren, 123
SortChildrenCB, 123
StartTransaction, 694-695
Stat, 564-565
StepIt, 106-107
Stop, 1122
StreamIn, 143
StreamOut, 143
StretchBlt, 202
SubclassDlgItem, 37
SubclassWindow, 37, 650
SubtractRect, 175
SuspendThread, 27
SwitchViews, 294-295
SysAllocString, 596
SysFreeString, 596
TabbedTextOut, 194
TapiGetLocationInfo, 989
TapiRequestMakeCall, 989, 1000-1001
TextOut, 193
ThrowErrno, 802
ThrowOsError, 802
TopLeft, 175
toString, 844
TrackPopupMenu, 313
TranslateAccelerator, 568
TrimLeft, 741
TrimRight, 741
Undo, 143
UnionRect, 175
Unlock, 616
UnlockRegion, 565
Unprepare, 707
UnregisterShellFileTypes, 32
UnregServer, 617
UnsubclassWindow, 37
Update

ADORecordset class, 720
CRecordset class, 677
CRowset class, 702-704

UpdateClientColor, 94
UpdateData, 39, 73-74
UpdateDialogControls, 39, 269-270
UpdateRegistry, 257
UpdateRegistryAll, 257
UpdateStatus, 908
VerifyPos, 100
Width, 175
Write, 109, 565, 760, 900
WriteProfileBinary, 31
WriteProfileInt, 31
WriteProfileString, 31
WriteString, 765, 900
WriteToFile, 952

metrics (clock control)

ComputeFacePoint method, 219-220
RecalcLayout method, 219

MFC AppWizard—Step 1 dialog box, 51
MFC AppWizard—Step 2 of 4 dialog box, 52
MFC AppWizard—Step 3 of 4 dialog box, 53
MFC AppWizard—Step 4 of 4 dialog box, 53
MFC-extension DLLs. See AFX DLLs
MFCServer application, 604-605

ATL Object Wizard, 606-610
CMFCServerModule module, 617-618
methods

ExitInstance, 616
InitATL, 615
InitInstance, 615
Lock, 616
RegServer, 617
Unlock, 616
UnregServer, 617

MFCServer.cpp code listing, 610-615
project settings, 618-620
proxy/stub files

export definition file, 620
makefile, 619

resource files, 618
test application, 621-623

MFC_CSTR_KLUDGE macro, 767-768
MF_BYCOMMAND flag (InsertMenu method), 312
MF_BYPOSITION flag (InsertMenu method), 312
MF_CHECKED flag (InsertMenu method), 312
MF_DISABLED flag (InsertMenu method), 312
MF_ENABLED flag (InsertMenu method), 312
MF_GRAYED flag (InsertMenu method), 312
MF_HILITE flag (InsertMenu method), 312
MF_POPUP flag (InsertMenu method), 312
MF_STRING flag (InsertMenu method), 312
MF_UNCHECKED flag (InsertMenu method), 312
MF_UNHILITE flag (InsertMenu method), 312
Microsoft DirectX. See DirectX
mini-servers, 452
MiscStatus subkey (COM objects), 540
MM_ANISOTROPIC mapping mode, 166
MM_HIENGLISH mapping mode, 166
MM_HIENGLISH mapping mode, 166, 286
MM_HIMETRIC mapping mode, 166, 286
MM_ISOTROPIC mapping mode, 166
MM_LOENGLISH mapping mode, 166, 286, 353
MM_LOMETRIC mapping mode, 166, 286
MM_TEXT mapping mode, 166, 286, 352-353
MM_TWIPS mapping mode, 167, 286
Mode property (ADOConnection class), 715
modeCreate file mode, 759
models, 1026, 1055-1057
modeNoInherit file mode, 759
modeNoTruncate file mode, 759
modeRead file mode, 759
modeReadWrite file mode, 759
modes

drawing modes, 167-169
file modes, 759-760

modeWrite file mode, 759
ModifyMenu method, 311
ModifyStyle method, 38
ModifyStyleEx method, 38
MOD_ALT flag (RegisterHotKey method), 87
MOD_CONTROL flag (RegisterHotKey method), 87
MOD_SHIFT flag (RegisterHotKey method), 87
monikers, 396-397, 402, 439, 442
monitors, 1097
monochrome, 197
month calendar control, 65
mouse

events, 232-234
messages, 305-307

handlers, 308-309
WM_MOUSEACTIVATE, 307
WM_MOUSEHOVER, 307
WM_MOUSELEAVE, 307
WM_MOUSEMOVE, 307
WM_MOUSEWHEEL, 308
WM_XBUTTONDBLCLK, 308
WM_XBUTTONDOWN, 308
WM_XBUTTONUP, 308

pointer state, changing, 22

MoveElementTo method, 564
MoveFirst method

ADORecordset class, 719-720
CRecordset class, 674
CRowset class, 701

MoveLast method

ADORecordset class, 719-720
CRecordset class, 674-675
CRowset class, 701

MoveNext method

ADORecordset class, 719-720
CRecordset class, 674-675
CRowset class, 701

MovePrev method

CRecordset class, 674-675
CRowset class, 701

MovePrevious method, 719-720
MoveTo method, 171
MSIE (Internet Explorer control), 819

CHtmlView wrapper class, 824-825

COM (component object model), relationship with, 827
document/view relationship, 825-827
methods, 824-826

dialog-based applications, 827-828
events, 823-824
IWebBrowser2 interface, 819-822

MTA (multithreaded apartment) model, 390
multimedia, 1118-1119. See also 2D graphics

animation

animation control, 131-135
double buffering, 1025
tearing, 1097

Media Player control, 1119-1120

CMediaPlayer class, 1121-1122
Projection application, 1122-1131
supported media formats, 1119-1120

sound files, playing, 1131-1132

CWave class, 1134-1140
DirectSound, 1140-1154
latency, 1132
PlaySound method, 1133

Multiple Document Interface. See MDI applications
multiple module definition files, 1194-1195
multiple-page documents, printing, 361-363

headers/footers, 365-367
known page counts, 363
unknown page counts, 364-365

multithreaded apartment (MTA) model, 390
multithreading, 389-390
MY.CPP file (CMyExtension)

declaration, 944
default command handler, 951-952
implementation, 945
parse map, 941

MY.H file (CMyExtension)

ClassWizard override declaration, 937
CMyExtension class declaration, 936-937
CWinApp declaration, 941
implementation file, 938-940
parse map declaration, 938

m_bAutoDelete flag, 798
m_bAutoRelease variable, 498
m_bDirect data member, 350
m_bHelpMode data member, 248
m_bPreview data member, 350
m_cause data member

CArchiveException class, 799-800
CFileException class, 800-801

m_hInstance data member, 246
m_hPrevInstance data member, 246-247
m_IosError data member, 801
m_lpCmdLine data member, 247
m_lpDispatch variable, 498
m_nAfxDaoError data member, 806-807
m_nCmdShow data member, 247-248
m_nCurPage data member, 350
m_nCurrentView member variable, 295
m_nNumPreviewPages data member, 350
m_nRetCode data member, 803-805
m_ofn data member, 772-773
m_pActiveWnd data member, 248
m_pchData data member, 733
m_pErrorInfo data member, 807
m_pMainWnd data member, 248
m_pszAppName data member, 245
m_pszExeName data member, 248
m_pszHelpFilePath data member, 248
m_pszProfileName data member, 248
m_pszRegistryKey data member, 248-249
m_rectDraw data member, 350
m_sc data member, 803
m_scode data member, 806
m_strError data member, 805
m_strFileName data member, 800
m_strStateNativeOrigin data member, 805
N
name mangling, 1183-1185
Name property

ADOField class, 724
ADOParameter class, 726
ADOProperty class, 725

name-based exports, 1183
name/value pairs (Registry), 1174-1176
named_guids attribute (#import directive), 503
naming conventions

FTP (File Transfer Protocol) files, 917
Hungarian, 1034
OpenGL functions, 1034-1036

NativeError property (ADOError class), 726-727
Navigate2 method, 849
NavigateComplete2 event, 823
navigation

databases, 674-675
DHTML (dynamic HTML)

anchor retrieval, 846-848
scrolling, 849-850

directories, 916, 930-931
files, 900-901

nBitmapID parameter (CImageList control), 110
nesting

exceptions, 788-789
statements, 782-783

network sockets, 852-855

blocking functions, 868-869
connections

closing, 861
opening, 857-859

creating, 856-857
datagram, 857
dialog-based application, 869

CAsyncSocket class inheritance, 874-876
closing connections, 882-883
opening connections, 876-879
sending/receiving messages, 880-882
shell, 870
window layout, 871-873

environment initialization, 855
error detection, 864-865
events

notification flags, 864
notification functions, 862-863
triggering, 863-864

messages

receiving, 860-861
sending, 859-860

network addresses, returning, 865-866
options, 866-868
serialization, 869

streaming, 857

New ATL Object command (Insert menu), 536, 687
New ATL Object dialog, 523
New Class command (Insert menu), 480
New Class dialog

automation, 480
property pages, adding, 538

New command (File menu), 50
NewWindow2 event, 823
nFileCount data member (MapiMessage structure), 974
nGrow parameter (CImageList control), 110
nImage1 parameter (CImageList control), 110
nImage2 parameter (CImageList control), 110
nInitial parameter (CImageList control), 110
nmake command, 620
NMHDR structure, 82-83
NM_CLICK notification code, 82
NM_DBLCLK notification code, 82
NM_KILLFOCUS notification code, 82
NM_OUTOFMEMORY notification code, 82
NM_RCLICK notification code, 82
NM_RDBLCLK notification code, 82
NM_RETURN notification code, 82
NM_SETFOCUS notification code, 82
nondiscardable bitmaps, 198
none value

CArchiveException::m_cause, 800
CFileException::m_cause, 801

normalization, 659, 1030-1031
NormalizeRect method, 175
normals, 1026
NOT XOR raster operations (clock control), 223
notifications, 239, 262. See also messages

animation controls, 133
common controls, 81

message structure, 82
notification codes, 82
notification process, 82-83
ON_NOTIFY macro, 83-84
ON_NOTIFY_RANGE macro, 84-85

list view controls, 116
tab controls, 126-127
tree view controls, 121

NOTSRCCOPY raster operation, 196
NOTSRCERASE raster operation, 196
NO_AFX_DAO_ERROR value (CDaoException::m_nAfxDaoError), 806
no_auto_exclude attribute (#import directive), 503
no_implementation attribute (#import directive), 503
no_namespace attribute (#import directive), 503
nPosition data member (MapiFileDesc structure), 975
nRecipCount data member (MapiMessage structure), 974
nTabOrigin parameter (TabbedTextOut method), 194
nTabPositions parameter (TabbedTextOut method), 194
Number property (ADOError class), 726
O
Object Definition Language. See ODL
object exporters, 403
object linking and embedding. See OLE
object models

defined, 637
designing, 638

object references (OBJREFS), 404
object-based programming, 8
object-oriented programming, 9
objects

aggregation, 386
automation objects, 393
CHttpServer, 955
Component Object Model, see COM
connectable, 398-399
containment, 386
creating

CoCreateInstance method, 400-401
CoCreateInstanceEx method, 401
monikers, 402

DAO (Data Access Objects), 664, 677-678

advantages, 665
CDaoDatabase class, 679-680
CDaoQueryDef, 682-684
CDaoRecordset class, 680
CDaoTableDef class, 681-682
CDaoWorkspace class, 678-679

DHTML (dynamic HTML), 832

document, 836-837
table of, 833-836

DirectSound, 1140

DirectSound, 1141
DirectSound3DBuffer, 1141
DirectSound3DListener, 1141
DirectSoundBuffer, 1142-1143
DirectSoundNotify, 1141

graphic, 148

declaring, 159
Windows drawing tools relationship, 158-159

handles, 10
initializing, 402
instantiating, 68-69
PrintInfo, 350
stubs, 387
text editor script

application, 639-640
document, 640
text selection, 640-641

OBJREFS (object references), 404
ODBC (open database connectivity), 664-665

advantages, 665
CDatabase class

BeginTrans method, 668
CanTransact method, 667
Close method, 666-667
CommitTrans method, 668
ExecuteSQL method, 667
OpenEx method, 666-667
Rollback method, 668

CRecordset class

derived classes, 668-673
methods, 674-677

ODL (Object Definition Language)

automation interfaces, 466
interface definition files, 489-490

Offset method, 170
OffsetPos method, 105
OffsetRect method, 175
OffsetRgn method 164, 179
OLE (object linking and embedding), 374-375, 453. See also automation; classes; macros

containers, 386

active document containers, 562-569, 570-571
control containers, 571-573
support for, 254

providers, 686
system libraries

AfxOleInit function, 418-419
AfxOleInitModule function, 419
initializing, 418

OLE DB, 686

accessors

CAccessor class, 695
CDynamicAccessor class, 696-699
CManualAccessor class, 700-701

compared to ADO (ActiveX Data Objects), 687
ATL (Active Template Libary)

ATL Object Wizard, 687-690
consumer classes, 687

CBooks class, 691-692
CBooksAccessor class, 690
CDataSource class, 692-693
connection strings, 693
consumers, 686
CSession class, 693-695
rowsets

CAccessorRowset class, 706
CArrayRowset class, 705
CBulkRowset class, 705
CCommand class, 706-707
CRowset class, 701-704
CTable class, 707-708

OLEUIGNRLPROPS structure, 438
OLEUILINKPROPS structure, 438
OLEUIOBJECTPROPS structure, 438
OLEUIVIEWPROPS structure, 439
OLE_APPTYPE enumeration, 413
OnAccept message handler, 862, 875, 878
OnActivateFrame message handler, 44
OnActivateView message handler, 44
OnAmbientProperty message handler, 573
OnApply message handler, 1201
OnBclose message handler, 883
OnBconnect message handler, 877
OnBeginPrinting message handler, 348-349
OnBsend message handler, 880-881
OnCancel message handler, 907, 1201
OnClose message handler, 567, 862, 882-883
OnCloseDocument message handler, 47
OnCmdMsg message handler, 22
OnConnect message handler, 862, 878
OnCreate message handler

status bars, 321
toolbars, 317-318
ToolTips, 323

OnCreateSubKey message handler, 1169-1171
OnDataChange message handler, 567
OnDeleteSubKey message handler, 1173-1176
OnDraw message handler, 43, 359, 550-551, 1053-1054
OnEndPrinting message handler, 348-349
OnEndPrintPreview message handler, 348
OnFileNew message handler, 298
OnFileOpen message handler, 773-775, 826
OnFileRunWizard message handler, 1219-1220
OnFileSendMail message handler, 976-981
OnFinalRelease message handler, 24
OnFullScreen event, 823
OnHide message handler, 458
OnIdle message handler, 28, 245, 266-268
OnInitDialog message handler, 67, 621-622, 876, 906-907, 1210
OnInPlaceActivate message handler, 567
OnInPlaceDeactivate message handler, 568
OnKeyDown message handler, 304-305
OnKillActive message handler, 329, 1201
OnLButton message handler, 308-309
OnMenuBar event, 823
OnMessagePending message handler, 863
OnMouseMove message handler, 308
OnNewDocument message handler, 47, 501
OnNotify message handler, 83
OnOK message handler, 1201
OnOpen message handler, 458
OnOpenDocument message handler, 47
OnOutOfBandData message handler, 862
OnPaint message handler, 1211
OnParseError message handler, 962-963
OnPosRectChange message handler, 568
OnPrepareDC message handler, 348-349, 364-368
OnPreparePrinting message handler, 348, 363
OnPrint message handler, 348-349, 360, 367-369
OnQueryCancel message handler, 1201
OnQuit event, 823
OnRButtonUp message handler, 313-314
OnReceive message handler, 863, 881
OnRename message handler, 567
OnRequestPositionChange message handler, 460-461
OnReset message handler, 1202
OnRType message handler, 873
OnSave message handler, 567
OnSaveDocument message handler, 47
OnSend message handler, 863
OnSetActive message handler, 329, 1202, 1218-1219
OnShow message handler, 458
OnShowWindow message handler, 566
OnStatusBar message handler, 823
OnStatusCallback message handler, 897, 904-906
OnTheaterMode event, 823
OnTimer message handler, 1154
OnToolBar event, 823
OnUIActivate message handler, 567
OnUIDeactivate message handler, 568
OnUpdate message handler, 43, 358
OnUpdateEditUndo message handler, 325
OnUpdateFileSendMail message handler, 976
OnViewChange message handler, 567
OnVisible event, 823
OnWizardBack message handler, 329, 1202-1204
OnWizardFinish message handler, 329, 1202
OnWizardFinished message handler, 1205
OnWizardNext message handler, 329, 1202, 1205, 1214-1216
ON_EN_UPDATE message map, 90
ON_EVENT macro, 430
ON_EVENT_RANGE macro, 430
ON_EVENT_REFLECT macro, 430
ON_NOTIFY macro, 83-84
ON_NOTIFY_RANGE macro, 84-85
ON_OLECMD macro, 421-422
ON_OLEVERB macro, 429
ON_PARSE_COMMAND macro, 942, 959
ON_PARSE_COMMAND_PARAMS macro, 942-944
ON_PROPNOTIFY macro, 430
ON_PROPNOTIFY_RANGE macro, 430
ON_PROPNOTIFY_REFLECT macro, 430
ON_STDOLEVERB macro, 429
ON_UPDATE_COMMAND_UI macro, 325
ON_WM_HSCROLL message map, 90, 97
ON_WM_VSCROLL message map, 90, 97
OOP (object-oriented programming), 9
open database connectivity. See ODBC
Open method, 760

ADOConnection class, 714-715
ADORecordset class, 718-719
CCommand class, 706
CDaoDatabase class, 679
CDaoQueryDef class, 683
CDaoTableDef class, 681
CDaoWorkspace class, 678
CDataSource class, 692
CSession class, 693-694
CTable class, 708

OpenDocumentFile method, 32, 282
OpenEx method, 666-667
OpenFile method, 917
OPENFILENAME structure, 771-772
OpenFromFileName method, 693
OpenFromInitializationString method, 693
OpenGL, 1024, 1032-1033

applications, 1042
blending, 1073
datatypes, 1033-1034
development history, 1024-1025
display lists

declaring, 1060
defined, 1060
example, 1061-1062
memory allocation, 1064
rendering, 1062-1063
troubleshooting, 1064

DLLs (dynamic link libraries), 1054-1055
downloading, 1025
fog effects, 1074-1075
function naming conventions, 1034-1036
light, 1064-1065

ambient, 1066-1067
diffuse, 1067
enabling lighting state, 1065
sources, 1065-1066
specular, 1067-1068

material properties

color tracking, 1069
setting, 1068-1069

matrix stack, 1037-1038
models, 1055-1057
render function scoping, 1036-1037
rendering contexts, 1038-1039, 1053-1054

creating, 1040
deleting, 1040
pixel format, 1040-1041
thread safety, 1039

rotation, 1058-1059
scaling, 1059-1060
texture mapping, 1069

applying texture, 1071-1072
device-independent bitmaps, 1070-1071

translation, 1058
views

background erasure, 1051
CGLView class, 1043
creating, 1044-1047
destroying, 1047-1048
integrating into applications, 1052-1053
palette management, 1051-1052
sizing, 1048-1050
style bits, 1043

opening

files, 282-284, 773-776

FTP (File Transfer Protocol), 917
WinInit, 899

socket connections, 857-859
URLs (Uniform Resource Locators), 892-893

OpenRequest method, 910-911
OpenStorage method, 564
OpenStream method, 564
OpenURL method

examples, 893
options, 892-893
protocol file types, 892

OpenWithPromptFileName method, 693
operator method, 705
operators

concatenation (+=), 736
CPoint class, 170
CRect class, 175-176

ordinal-based exports, 1183
orthographic fristrums, 1026
OSErrorToException method, 802
ostream class, 779
outer methods (IHTMLElement interface), 845-846
outgoing interfaces. See connection points
overloaded functions, 1184
ownership, 38
OXID resolvers, 403
P
<p> tag (HTML), 832
page flipping (DirectDraw), 1097-1100
pagination (printing), 361-363

headers/footers, 365-367
known page counts, 363
unknown page counts, 364-365

painting

clock control

face, 220-221
hands, 221-224

hyperlink control

DrawFocusRect method, 229-230
DrawText method, 229

palettes

CPalette class, 163
DirectDraw

332 palette, 1090-1091
creating, 1089-1091, 1107-1108
management support, 1091-1093
re-establishing, 1109-1111

hardware, 163
OpenGL management, 1051-1052
system, 163

PARAFORMAT structure, 139-141
Parameters collection, 722
parse maps

CMembrAppExtension, 960, 964-965
CMyExtension

code listing, 941
declaration, 938, 941-942
macros, 942-944

ParseCommandLine method, 33
parsing

command-line, 33
URLs (Uniform Resource Locators)

AfxParseURL function, 911-912
AfxParseURLEx function, 913

participants

adding to events, 753-754
removing from events, 754

Paste method, 144
PasteSpecial method, 144
PATCOPY raster operation, 196
path methods (CDC class), 153
PATINVERT raster operation, 197
PATPAINT raster operation, 197
Pause method, 1122
pbParamInfo parameter (InvokeHelper method), 499
pens

CBrush class, 161
CPen class, 160-161
creating, 160
pen styles, 160, 170-172

persistence servers, 393, 462-463
persisting data, 393-394

defined, 422
IPersist interfaces, 395-396
structured storage, 394-395
version support, 423

perspective foreshortening, 1027
phone dialer application (Assisted Telephony), 999-1001
physical coordinates, 165-167
physical fonts. See fonts
picture control, 59
PIXELFORMATDESCRIPTOR structure, 1040-1041
pixels, 1040-1041
placeholders, 477-478
Play method, 1122
playing sound files. See sound files
PlaySound method, 1132-1133
plus sign (+), 990
pointers

smart

defined, 591
templates, 591-593

state, changing, 22

points, 185

CDC class, 170
CPoint class, 169-170
drawing, 170

PolyBezier method, 183-184
Polygon method, 179-180
polygons, 179-180

coplanar, 1030
decals, 1026
wireframe, 1026

PolyLine method, 172-174
polylines, 172-174
polymorphism, 9
pop-up menus

floating, 313-314
pointers, 311

POSITION pointer, 746
positional light, 1066
PositionRects method, 208
POST requests, 957-958
PreCloseFrame method, 47
PreCreateWindow method, 37
Prepare method, 707
Prepared property (ADOCommand class), 724
preprocessor directives, #import, 501

attributes, 502-504
syntax, 502

PressButton method, 1201
PreSubclassWindow method, 38
PreTranslate method, 28
PreTranslateMessage method, 261-262
primary surfaces (DirectDraw), 1094
Primary Type Library header files. See TLH files
Print dialog box, 76-77
print jobs, stopping

OnPrepareDC method, 367-368
OnPrint, 368-369

printer escape methods (CDC class), 153
PrintInfo object, 350
printing, 346-347. See also Shaper application

CView class methods, 347

DoPreparePrinting, 348
OnBeginPrinting, 348-349
OnEndPrinting, 348-349
OnEndPrintPreview, 348
OnPrepareDC, 348-349
OnPreparePrinting, 348
OnPrint, 348-349

GDI mapping modes

MM_LOENGLISH, 353
MM_TEXT, 352-353

menu commands, 351
pagination, 361-363

headers/footers, 365-367
known page counts, 363
unknown page counts, 364-365

print jobs, stopping

OnPrepareDC method, 367-368
OnPrint, 368-369

PrintInfo object, 350
WYSIWYG (what you see is what you get)

application classes, 356-357
application resources, 354-356
view classes, 357-361

PrintPageFooter method, 366
PrintPageHeader method, 360-361
priority, 27
Process method, 803
processes, 12
processing forms. See form processing
ProcessMessageFilter method, 28
ProcessShellCommand method, 33
ProcessWndProcException method, 28
ProgID subkey (COM objects), 540
Programmable subkey (COM objects), 539
progress bar controls, 62

creating, 106
methods, 105-106
range/current position, 106-107

ProgressChange event, 823
Projection application (Media Player demonstration), 1122

Projector.rc resource script, 1124-1125
ProjectorDlg.cpp source code file, 1128-1130
ProjectorDlg.h header file, 1126-1127
Resource.h header file, 1123

projection frustrums, 1026
Projector.rc resource script (Projection application), 1124-1125
ProjectorDlg.cpp source code file (Projection application), 1128-1130
ProjectorDlg.h header file (Projection application), 1126-1127
properties, 530. See also property pages

ADOCommand class

ActiveConnection, 724
CommandText, 721
CommandTimeout, 722
CommandType, 721
ConnectionString, 715
Prepared, 724

ADOConnection class

CommandTimeout, 717
ConnectionTimeout, 715
DefaultDatabase, 715
IsolationLevel, 716
Mode, 715
Provider, 715

ADOError class

Description, 726
NativeError, 726-727
Number, 726
Source, 726

ADOField class

ActualSize, 724
Attributes, 725
DefinedSize, 724
Name, 724
Type, 724
Value, 725

ADOParameter class, 726
ADOProperty class, 725
ADORecordset class

ActiveConnection, 721
BOF, 719
CacheSize, 720
EOF, 719
Source, 719

ambient, 531-532

accessing, 532
dynamic state, 532-533

automation servers, 478-483
controls, 544, 554
custom, 530-531
dual interfaces, 636-637
editors, 535
object material properties

color tracking, 1069
setting, 1068-1069

read-only, 531
stock, 531
write-only, 531

Properties dialog (ATL Object Wizard), 688-689
Properties collection

ADOCommand class, 724
ADOConnection class, 717
ADOField class, 725
ADORecordset class, 721

property pages, 535-538

adding, 433
ATL (Active Template Library), 536-537
compared to wizards, 326
CPropertyPage class, 329, 1201-1202
CPropertySheet class, 327-329, 1200-1201
data mapping, 431-432
declaring, 433
defined, 1200
IPropertyPage interface, 536
IPropertyPageSite interface, 536
runtime, 535

property sheets. See property pages
PropertyChange event, 823
PROPPAGEID macro, 433
PROPSHEETHEADER structure, 439
protocols

FTP (File Transfer Protocol), 887-888, 894-895, 915-921
Gopher, 888, 895, 921-924
HTTP Hypertext Transfer Protocol), 886-887, 893, 910-915
UDT (Uniform Data Transfer), 397-398
VoIP (Voice-Over-IP), 998

Provider property (ADOConnection class), 715
proxies, 387
PSN_WIZBACK message, 1204
PSN_WIZFINISH message, 1205
PSN_WIZNEXT message, 1205
PSWIZB_BACK bit flag (SetWizardButtons method), 1204
PSWIZB_DISABLEDFINISH bit flag (SetWizardButtons method), 1204
PSWIZB_FINISH bit flag (SetWizardButtons method), 1204
PSWIZB_NEXT bit flag (SetWizardButtons method), 1204
PtInRect method, 175
PtInRegion method, 164, 179
pushbuttons. See buttons
PushDefaultStackArgs method, 962
PutFile method, 916
put_hash method, 849-850
put_innerHTML method, 843-845
put_innerText method, 843-844
put_outerHTML method, 845
put_Text method, 843
pvRet parameter (InvokeHelper method), 499
PX_Blob function, 423
PX_Bool function, 423
PX_Color function, 424
PX_Currency function, 424
PX_DataPath function, 424
PX_Double function, 424
PX_Float function, 424
PX_Font function, 424
PX_IUnknown function, 424
PX_Long function, 424
PX_Picture function, 424
PX_Short function, 424
PX_String function, 424
PX_ULong function, 424
PX_UShort function, 424
PX_VBXFontConvert function, 424
Q
QueryFinished method, 364
QueryInfo method, 914
QueryInfoStatusCode method, 915
QueryInterface method, 380-381, 592, 839
QuerySiblings method, 1202
QueryStatus method, 569
R
R2_BLACK drawing mode, 168
R2_COPYPEN drawing mode, 168
R2_MASKNOTPEN drawing mode, 168
R2_MASKPEN drawing mode, 168
R2_MASKPENNOT drawing mode, 168
R2_MERGENOTPEN drawing mode, 168
R2_MERGEPEN drawing mode, 168
R2_MERGEPENNOT drawing mode, 168
R2_NOT drawing mode, 168
R2_NOTCOPYPEN drawing mode, 168
R2_NOTMASKPEN drawing mode, 168
R2_NOTMERGEPEN drawing mode, 168
R2_NOTXORPEN drawing mode, 168
R2_WHITE drawing mode, 168
R2_XORPEN drawing mode, 168
RACMGR32 (Remote Automation Connection Manager), 514-516
radio button control, 61
raising exceptions, 789-790
ranges (progress bars), 106-107
raster graphics

bitmaps

BBTs (bit block transfers), 201-202
BITMAP1 sample application, 206-210
CBitmap class, 199-201
color depth, 197-198
DDBs (device-dependent bitmaps), 198-199
DIBs (device-independent bitmaps), 199
resources, 203-205

ROPs (raster operations), 196-197

raw_dispinterfaces attribute (#import directive), 503
raw_interfaces_only attribute (#import directive), 503
raw_method_prefix attribute (#import directive), 503
raw_native_types attribute (#import directive), 503
raw_property_prefixes attribute (#import directive), 503
Read method, 109, 565, 760, 900
read-only properties, 531
reading files, 776-778, 900
readOnly value (CArchiveException::m_cause), 800
ReadString method, 765-767, 900
rebars

creating, 318
CReBar class, 315

RecalcLayout method, 219
Receive method, 860
ReceiveFrom method, 861
receiving messages, 860-861
records

defined, 657
deleting, 663

ADO (ActiveX Data Objects), 714
Delete method, 676-677

editing

ADO (ActiveX Data Objects), 713
Edit method, 675-676

inserting, 662

AddNew method, 674
ADO (ActiveX Data Objects), 713

searching, 712

recordsets

CDaoRecordset class, 680
CRecordset class

derived classes, 668-673
methods, 674-677

dynasets, 670
snapshots, 670

Rectangle method, 176
rectangles

CDC class, 176-177
CRect class

methods, 174-175
operators, 175-176

drawing, 176-177
rounded, 176-177

RectInRegion method, 164, 179
reference counts (interfaces), 377
REFIID riid argument

GetIDsOfNames method, 469
Invoke method, 470

RegCloseKey method, 30, 1165
RegCreateKey method, 1165
RegDeleteKey method, 1165
RegDeleteValue method, 1165
RegEnumKey method, 1165
RegEnumValue method, 1165
RegFlushKey method, 1165
region methods (CDC class), 153
regions

Boolean operations, 179
clipping regions, 177
creating, 177-178
CRgn class, 163-164

RegisterAll method, 257
RegisterClass function, 11
RegisterHotKey method, 87
registering

controls

AfxOleRegisterControlClass function, 417
AfxOleRegisterPropertyPageClass function, 417
AfxOleRegisterTypeLib function, 417
AfxOleUnregisterClass function, 417
AfxOleUnregisterTypeLib function, 418

window classes, 11, 35

RegisterShellFileTypes method, 32, 256
registration

active document servers, 462
controls, 538-539

reregistration, 543
self-registration, 539

document servers, 454-455
scripts, 539

Registry, 538, 1160-1162. See also RegSamp application

API (appliction programming interface) functions, 1165-1167

RegCloseKey, 1165
RegCreateKey, 1165
RegDeleteKey, 1165
RegDeleteValue, 1165
RegEnumKey, 1165
RegEnumValue, 1165
RegFlushKey, 1165
RegLoadKey, 1165
RegNotifyChangeKeyValue, 1165
RegOpenKey, 1165
RegQueryInfoKey, 1165
RegSaveKey, 1165
wrapping, 1176

configuration data, 1162
CWinApp class methods

GetAppRegistryKey, 30
GetProfileBinary, 31
GetProfileInt, 31
GetProfileString, 31
GetSectionKey, 30
RegCloseKey, 30
SetRegistryKey, 30, 254
WriteProfileBinary, 31
WriteProfileInt, 31
WriteProfileString, 31

keys, 1163

creating, 1168, 1171-1172
deleting, 1172-1174
HKEY_CLASSES_ROOT, 1164
HKEY_CURRENT_CONFIG, 1164
HKEY_CURRENT_USER, 1164
HKEY_DYN_DATA, 1164
HKEY_LOCAL_MACHINE, 1164
HKEY_USERS, 1164

name/value pairs, 1174-1176
Registry Key Editor dialog, 1167-1168
services information, 1162
state, 1162
user preferences, 1162
values, 1163

RegLoadKey method, 1165
RegNotifyChangeKeyValue method, 1165
RegOpenKey method, 1165
RegQueryInfoKey method, 1165
RegSamp application (Registry), 1167

keys

creating, 1168, 1171-1172
deleting, 1172-1174

name/value pairs, 1174-1176
Registry Key Editor dialog, 1167-1168

RegSaveKey method, 1165
RegServer method, 617
regular DLLs (dynamic link libraries), 1180
REG_OPTION_BACKUP_RESTORE option (RegCreateKeyEx function), 1171
REG_OPTION_NON_VOLATILE option (RegCreateKeyEx function), 1171
REG_OPTION_VOLATILE option (RegCreateKeyEx function), 1171
relational databases. See databases
Release method, 382
ReleaseAttribDC method, 152
ReleaseCommand method, 707
ReleaseDispatch method, 494
ReleaseFile method, 47
ReleaseOutputDC method, 152
ReLoadDDBitmap method, 1109-1110
remote automation, 512-513

Automation Manager, 516-517
Remote Automation Connection Manager, 514-516

Remove method, 109, 760
RemoveAll method, 747
RemoveAt method, 754
removeCurrentDir value (CFileException::m_cause), 801
RemoveDirectory method, 916
RemoveHead method, 747
RemoveImage method, 128
RemoveMenus method, 568
RemovePage method, 328, 1201
RemoveTail method, 747
RemoveView method, 45
rename attribute (#import directive), 503
Rename method, 760, 917
RenameElement method, 564
rename_namespace attribute (#import directive), 503
rendering contexts (OpenGL), 1038-1039

creating, 1040
deleting, 1040
pixel format, 1040-1041
thread safety, 1039

rendering graphics. See DirectDraw; OpenGL
RePalettize method, 1109
Replace method, 109
ReplaceSel method, 142
Report view, 111
ReportError method, 798
ReportSaveLoadException method, 47
Requery method, 677
RequestNewObjectLayout method, 566
RequestResize method, 144
requests

closing, 914
GET, 957-958
headers, 913
POST, 957-958
retrieving information about, 914-915
sending, 914

ResetSymbols.h file, 1190
resolution, 352
Resource Editor, 240
resource view, 56-57
Resource.h files, 56

Projection application, 1123
War application, 1144-1145

resources

bitmap resources

adding to executable files, 203-204
retrieving from executable files, 204-205

IDD_ABOUTBOX, 56
identifiers, 330-331
IDR_MAINFRAME, 57
Projection application, 1124-1125
VS_VERSION_INFO, 57

ResourceView tab (Visual Studio), 56-57
Restore method, 1107
RestoreDSBuffers method, 1147, 1153
RestoreWaitCursor method, 22
resultant vectors, 1029
ResumeThread method, 27
resuming thread execution, 27
ReverseFind method, 737-738
Revert method, 564-565
RGN_AND Boolean value (CRgn class), 179
RGN_COPY Boolean value (CRgn class), 179
RGN_DIFF Boolean value (CRgn class), 179
RGN_OR Boolean value (CRgn class), 179
RGN_XOR Boolean value (CRgn class), 179
rich edit controls, 64-65, 135-137

creating, 145
implementing, 145-146
methods

Clipboard methods, 143-144
editing methods, 143
formatting methods, 142-143
general-purpose methods, 144-145
line-related methods, 141-142
text-selection methods, 142

structures

CHARFORMAT, 138-139
PARAFORMAT, 139-141

support for, 257
window styles, 137

rollback actions (transactions), 660
Rollback method, 668, 679
RollbackTrans method, 716
ROPs (raster operations), 196-197
rotation, 1026, 1058-1059
rounded rectangles, 176-177
RoundRect method, 176-177
routing messages, 19, 259-260

classes, 260-261
message maps, 20-22
OnCmdMsg method, 22
PreTranslateMessage method, 261-262

rows. See records
rowsets

CBulkRowset class, 705
CRowset class

Close method, 704
Delete method, 702-704
Insert method, 702-703
MoveFirst method, 701
MoveLast method, 701
MoveNext method, 701
MovePrev method, 701
Update method, 702-704

RTTI (Runtime Type Information), 15-16
Run method, 27, 244
RunAutomated method, 33
RunEmbedded method, 33
RunModalLoop method, 39
runtime environment (COM), 384
Runtime Type Information (RTTI), 15-16
RUNTIME_CLASS macro, 280
S
SAFEARRAYs, 405-406
SAMPLEWIZDATA structure, 1216-1217
Save method, 566
SaveCompleted method, 566
SaveModified method, 45
SaveObject method, 566
scalar values, 1029
scaling models, 1026, 1059-1060
scripting, 626-627

binding

early, 634
late, 634-635

events, 649-651
interfaces, 627-628

dispinterfaces (dispatch interfaces), 635
dual, 634
IActiveScript, 628, 633
IActiveScriptParse, 628, 633
IActiveScriptSite, 628-632
IActiveScriptSiteWindow, 628-632
properties, 636-637

licensing, 629
object implementation

ATL (Active Template Library) object creation, 641-644
initialization, 646-649
scriptable object requirements, 644-645

object models

defined, 637
designing, 638
example, 639-641

script management, 651
script registration, 539

Scroll method, 568
scrollbar control, 62
scrolling

DHTML (dynamic HTML), 849-850
views, 286

SDI (Single Document Interface) applications, 52, 277

CSingleDocTemplate class, 278-279
initialization, 251
MFCServer, 604-605

ATL Object Wizard, 606-610
CMFCServerModule module, 617-618
methods, 615-617
MFCServer.cpp code listing, 610-615
project settings, 618-620
proxy/stub files, 619-620
resource files, 618
test application, 621-623

views, changing, 291-295

searching

records, 712
strings, 737-738

secondary surfaces (DirectDraw)

back buffers, 1094
creating, 1094-1095, 1103-1104

security, DCOM (Distributed COM), 404-405
Seek method, 565, 900
SeekToBegin method, 760
SeekToEnd method, 760
Select Database Table dialog (ATL Object Wizard), 689
SELECT statement (SQL), 661-662
Select method, 123
SelectDropTarget method, 123
SelectItem method, 123
Send method, 859
sending

messages, 859-861, 914
requests, 914

SendRequest method, 914
SendRequestEx method, 914
SendTo method, 861
serialization

defined, 422
exceptions, 18
explicit, 19
functions, 423-424
implicit, 19
methods

IsSerializable, 17
Serialize, 18-19, 869

socket communications, 869

Serialize method, 18-19, 869
servers, 377, 382-383, 450

active document

CDocObjectServerItem class, 458-459
COleDocIPFrameWnd class, 459-462
editing views, 463-465
OLE servers comparison, 451-452
persistence, 462-463
registration, 462

automation, 393, 466. See also Autoserv application

connecting to, 493-495
DLLs, 476
executable, 476
IDispatch interfaces, 471-472
#import directive, 501-504
methods, 478-483
placeholders, 477-478
properties, 478-483

container, 452
document 444-446, 450-453

CDocItem class, 456
COleClientItem class, 456
command-line arguments, 456
in-place frames, 457-458
registration, 454-455

document/view architecture, 453-454
full, 451
in-process, 383
local, 383
MFCServer application, 604-605

ATL Object Wizard, 606-610
CMFCServerModule module, 617-618
methods, 615-617
MFCServer.cpp code listing, 610-615
project settings, 618-620
proxy/stub files, 619-620
resource files, 618
test application, 621-623

mini-servers, 452
persistence servers, 393
remote, 383

services, 1162
ServiceTypeFromHandle method, 899
SetActivePage method, 1201
SetActiveView method, 42
SetAntenna method, 547-548, 586
SetAt method, 747
SetAttribDC method, 152
SetBackgroundColor method, 144
SetBarStyle method, 323
SetBitmap method, 318
SetBitmapBits method, 200
SetBitmapDimension method, 200
SetBkColor method, 109, 193
SetBkMode method, 193
SetButtons method, 318-319
SetCapture method, 232
SetCheck method, 325
SetClass method, 564
SetCookie method, 895
SetCooperativeLevel method, 1087
SetCurrentDirectory method, 916
SetCurrentPosition method, 1122
SetCurSel method, 128
SetDefaultCharFormat method, 143
SetDragCursorImage method, 109
SetElementTimes method, 564
SetEventMask method, 144
SetFileName method, 1122
SetFinishText method, 1201, 1205
SetFont method, 1212
SetHotKey method, 86
SetHWnd method, 1101
SetImageList method, 123, 128
SetIndent method, 123
SetItem method, 123, 128
SetItemData method, 123
SetItemImage method, 123
SetItemSize method, 128
SetItemState method, 123
SetItemText method, 123
SetLength method, 760
SetLineSize method, 99
SetMaxPage method, 364
SetMenu method, 568
SetMessageText method, 42
SetModified method, 1202
SetModifiedFlag method, 45
SetModify method, 144
SetOptions method, 145
SetOutputDC method, 152
SetOverlayImage method, 109
SetOwner method, 38
SetPadding method, 128
SetPageSize method, 99
SetParaFormat method, 143
SetParam method, 699-700
SetParameterInfo method, 707
SetParent method, 874
SetParentDialog method, 904
SetPathName method, 45
SetPixel method, 170
SetPixelFormat method, 1046
SetPos method, 99, 106
SetProperty method, 573, 577
SetRadio method, 325
SetRange method, 99, 106
SetRangeMax method, 99
SetRangeMin method, 99
SetReadBufferSize method, 901
SetReadOnly method, 145
SetRect method, 145, 175
SetRectEmpty method, 175
SetRectRgn method, 164, 179
SetRegistryKey method, 30, 249, 1166
SetRop2 method, 168
SetRows method, 705
SetRules method, 86
SetScaleToFitSize method, 286
SetScrollSizes method, 286
SetSel method, 142
SetSelection method, 99
SetSelectionCharFormat method, 143
SetSize method, 565, 745-746
SetSockOpt method, 867
SetSQL method, 684
SetStateBits method, 564
SetStatus method, 698-699
SetStatusText method, 568
SetStep method, 106
SetTargetDevice method, 145
SetText method, 325
SetThreadPriority method, 27
SetTic method, 99
SetTicFreq method, 99
SetTitle method, 42, 45, 1201
SetTooltips method, 128
SetValue method, 697-698
SetViewportExt method, 166
SetVolume method, 1122
SetWindowExt method, 166
SetWindowText method, 587
SetWizardButtons method, 328, 333, 1201-1203
SetWizardMode method, 328, 1201-1203
SetWordCharFormat method, 143
SetWriteBufferSize method, 901
Shaper application (printing example)

classes

CShaperApp, 356-357
CShaperView, 357

keyboard accelerator resource definition, 356
menu resource definition, 354-355
methods

OnDraw, 359
OnPrint, 360
OnUpdate, 358-359
PrintPageHeader, 361

toolbar resource definition, 355-356

shapes. See 2D graphics
shareCompact file mode, 760
shareDenyNone file mode, 760
shareDenyRead file mode, 759
shareDenyWrite file mode, 759
shareExclusive file mode, 760
sharingViolation value (CFileException::m_cause), 801
ShowGrabHandles property, 532
ShowHatching property, 532
ShowObject method, 566
ShutDown method, 861
Simple MAPI (Messaging Application Programming Interface), 971-972
Single Document Interface applications. See SDI applications, 52, 277
single-threaded apartment (STA) model, 390
sink maps

declaring, 429
event-mapping macros, 429-430

Size property (ADOParameter class), 726
Size method, 175
sizing

OpenGL views, 1048-1050
slider controls, 104

slider controls, 63

creating, 100
messages, 96-98
methods, 98-100
resizing, 104
SLIDER1 sample application, 100-102

header file, 102-103
implementing, 103-104

window styles, 95-96

SLIDER1 application (slider control), 100-102

header file, 102-103
implementing, 103-104

Small Icon view, 111
smart pointers

defined, 591
templates, 591-593

atlbase.h file, 593
CComPtr class, 592
CComQIPtr class, 592-593

snapshots, 670
SND_ASYNC flag (PlaySound method), 1133
SND_FILENAME flag (PlaySound method), 1133
SND_LOOP flag (PlaySound method), 1133
SND_MEMORY flag (PlaySound method), 1133
SND_NODEFAULT flag (PlaySound method), 1133
SND_NOSTOP flag (PlaySound method), 1133
SND_RESOURCE flag (PlaySound method), 1133
SND_SYNC flag (PlaySound method), 1133
sockets, 853-855

blocking functions, 868-869
connections

closing, 861
opening, 857-859

creating, 856-857
datagram, 857
dialog-based application, 869

CAsyncSocket class inheritance, 874-876
closing connections, 882-883
opening connections, 876-879
sending/receiving messages, 880-882
shell, 870
window layout, 871-873

environment initialization, 855
error detection, 864-865
events

notification flags, 864
notification functions, 862-863
triggering, 863-864

messages

receiving, 860-861
sending, 859-860

network addresses, returning, 865-866
options, 866-868
serialization, 869
streaming, 857

SortChildren method, 123
SortChildrenCB method, 123
sound files, playing, 1131-1132

CWave class, 1134-1140
DirectSound, 1080

objects, 1140-1143
static/streaming sound buffers, 1143
War application, 1144-1154

latency, 1132
PlaySound method, 1133

source code listings. See listings
Source property

ADOError class, 726
ADORecordset class, 719

SO_ACCEPTCONN option (sockets), 867
SO_BROADCAST option (sockets), 867
SO_DEBUG option (sockets), 867
SO_DONTLINGER option (sockets), 867
SO_DONTROUTE option (sockets), 867
SO_ERROR option (sockets), 867
SO_KEEPALIVE option (sockets), 867
SO_LINGER option (sockets), 867
SO_OOBINLINE option (sockets), 867
SO_RCVBUF option (sockets), 867
SO_REUSEADDR option (sockets), 867
SO_SNDBUF option (sockets), 867
SO_TYPE option (sockets), 867
specular light, 1027, 1067-1068
spin controls, 62

buddy windows, 88
creating, 91
messages, 90
methods, 90-91
SPIN1 sample application, 91-92

header, 92-93
implementing, 93-94

window styles, 89

SPIN1 application, 91-92

header, 92-93
implementing, 93-94

splash screens, 270-271
SplitPartsString utility, 738-741
splitting views, 340-342
Spy++, 225
SQL (Standard Query Language) statements, 660

DELETE, 663
INSERT, 662
SELECT, 661-662
UPDATE, 663

SRCAND raster operation, 197
SRCCOPY raster operation, 197
SRCERASE raster operation, 197
SRCINVERT raster operation, 197
SRCPAINT raster operation, 197
STA (single-threaded apartment) model, 390
standard controls

button, 60
check box, 60
combo box, 61
edit box, 60
group box, 60
list box, 61
picture, 59
radio button, 61
scrollbars, 62
static text, 59

standard dialog boxes

Color Selection, 75
File Open/Save, 74
Font Selection, 75-76
Print, 76-77

standard marshalers, 388
Standard Query Language. See SQL statements
Standard Template Library (STL), 754-755
starting

AppWizard, 50
transactions, 694-695

StartOfCode.h file, 1191
StartTransaction method, 694-695
Stat method, 564-565
state

defined, 1162
managing, 324-325

statements

goto, 783-784
if-then-else, 782-783
SQL (Standard Query Language), 660

DELETE, 663
INSERT, 662
SELECT, 661-662
UPDATE, 663

static clock control. See clock control
static sound buffers, 1143
static text control, 59
STATIC_DOWNCAST macro, 16
status, WinInit sessions

indicators, 897-898
service types, 899

status bars

creating, 319

panes, 321
string resource definitions, 320-321

CStatusBar class, 315

StatusTextChange event, 823
StdAfx.cpp files, 55
StdAfx.h files, 55
StepIt method, 106-107
STL (Standard Template Library), 754-755
stock properties, 531
Stop method, 1122
stopping

print jobs

OnPrepareDC method, 367-368
OnPrint method, 368-369

threads

user interface threads, 26
worker threads, 25

stopwatch control. See clock control
storage. See also containers

IPersistStorage interface, 565-566
IStorage interface, 563-564
IStream interface, 565
structured, 394-395

str parameter (TabbedTextOut method), 194
streambuf class, 779
StreamIn method, 143
streaming sockets, 857
streaming sound buffers, 1143
StreamOut method, 143
streams, 563, 778-780

filebuf class, 779
fstream class, 779-780
istream class, 779
ostream class, 779
streambuf class, 779

StretchBlt method, 202
string resource tables, 57
strings (CString class), 732, 741

allocating, 734-736
BSTRs, 405

allocating/deallocating, 595-596
_bstr_t class, 597
CComBSTR templates, 595-597
defined, 594

class declaration, 733
comparing, 738
concatenating, 736
CStringData structure, 733-735
data members, 732-733
searching, 737-738
SplitPartsString utility, 738-741
UNL_MultiEd application

classes, 749-753
participants, adding/removing, 753-754

wide-character

conversion macros, 597-599
defined, 594

<strong> tag (HTML), 832
structured exceptions

example, 786-788
nesting, 788-789
raising, 789-790
try/finally blocks, 790-792

structured storage, 394-395. See also containers

IPersistStorage interface, 565-566
IStorage interface, 563-564
IStream interface, 565
storages, 563
streams, 563

structures

AFX_EXTENSION_MODULE, 1182
BITMAP, 198-199
CHARFORMAT, 138-139
DDSURFACEDESC, 1094
EXTENSION_CONTROL_BLOCK, 949-950
INITCOMMONCONTROLS-EX, 80-81
LINEDEVCAPS, 1009-1011
LINETRANSLATEOUTPUT, 1014
LOGFONT, 189-190
LV_COLUMN, 118
MapiFileDesc, 974-975
MapiMessage, 973-974
NMHDR, 82-83
OPENFILENAME, 771-772
PARAFORMAT, 139-141
PIXELFORMATDESCRIPTOR, 1040-1041
SAMPLEWIZDATA, 1216-1217
TC_ITEM, 128-129
TEXTMETRIC, 186-189

stub objects, 387
style bits (OpenGL views), 1043
SubclassDlgItem method, 37
subclassing, 214, 225

controls

ATL, 528
MFC, 527-528

defined, 215
limitations, 237-239
windows

PreSubclassWindow method, 38
SubclassDlgItem method, 37
SubclassWindow method, 37
UnsubclassWindow method, 37

SubclassWindow method, 37, 650
subkeys, 539-540
SubtractRect method, 175
superclassing, 214
Supplemental Telephony Services, 993-994
surfaces (DirectDraw), 1093-1094

clearing, 1096-1097
creating

primary surfaces, 1094
secondary surfaces, 1094-1095, 1103-1104

suspending threads, 27
SuspendThread method, 27
SwitchViews method, 294-295
SysAllocString method, 596
SysFreeString method, 596
system libraries (OLE), initializing

AfxOleInit function, 418-419
AfxOleInitModule function, 419

system palettes, 163
T
T2OLE macro, 597
tab controls, 64

adding tabs to, 130
creating, 129
message handlers, 130-131
methods, 127-128
notification messages, 126-127
TC_ITEM structure, 128-129
window styles, 125-126

tabbed dialog boxes. See property sheets
TabbedTextOut method, 194
tables

CDaoTableDef class

Close method, 681
GetFieldCount method, 682
GetFieldInfo method, 682
Open method, 681

columns, 657, 682
data retrieval, 661-662
defined, 657
string resource tables, 57
updating, 663
viewing layout of, 681
vtables (virtual tables), 20-21, 378, 1193

tags (HTML), 832
TAPI (Telephony Application Programming Interface), 988-989

Assisted Telephony

functions, 989, 1000-1001
phone dialer application, 999-1001

Basic Telephony Services

address translation, 990-991
addresses, 1002
call handle manipulation, 993
calls, 991-992
configuring, 1003-1012
connecting with, 1012-1016
data transmission, 1016-1018
disconnecting, 1018
lines, 1002
terminating sessions, 1018-1019

CTapi class, 1002
development history

version 1.3, 995
version 1.4, 996
version 1.5, 996
version 2, 996-997
version 2.1, 997
version 2.2, 997-998
version 3, 998-999

Extended Telephony Services, 994-995
Supplemental Telephony Services, 993-994

TapiGetLocationInfo method, 989
TapiRequestMakeCall method, 989, 1000-1001
TBS_AUTOTICKS style (slider control), 96
TBS_BOTH style (slider control), 96
TBS_BOTTOM style (slider control), 96
TBS_ENABLESELRANGE style (slider control), 96
TBS_HORZ style (slider control), 96
TBS_LEFT style (slider control), 96
TBS_NOTICKS style (slider control), 96
TBS_RIGHT style (slider control), 96
TBS_TOP style (slider control), 96
TBS_VERT style (slider control), 96
TB_BOTTOM notification code (slider control), 97
TB_ENDTRACK notification code (slider control), 97
TB_LINEDOWN notification code (slider control), 97
TB_LINEUP notification code (slider control), 97
TB_PAGEDOWN notification code (slider control), 97
TB_PAGEUP notification code (slider control), 98
TB_THUMBPOSITION notification code (slider control), 98
TB_THUMBTRACK notification code (slider control), 98
TB_TOP notification code (slider control), 98
TCN_KEYDOWN notification message, 127
TCN_SELCHANGE notification message, 127
TCN_SELCHANGING notification message, 127
TCP_NODELAY option (sockets), 867
TCS_BUTTONS style (tab control), 126
TCS_FIXEDWIDTH style (tab control), 126
TCS_FOCUSNEVER style (tab control), 126
TCS_FOCUSONBUTTONDOWN style (tab control), 126
TCS_FORCEICONLEFT style (tab control), 126
TCS_FORCELABELLEFT style (tab control), 126
TCS_MULTILINE style (tab control), 126
TCS_OWNDERDRAWFIXED style (tab control), 126
TCS_RAGGEDRIGHT style (tab control), 126
TCS_RIGHTJUSTIFY style (tab control), 126
TCS_SHAREIMAGELISTS style (tab control), 126
TCS_SINGLELINE style (tab control), 126
TCS_TABS style (tab control), 126
TCS_TOOLTIPS style (tab control), 126
TC_ITEM structure, 128-129
tearing, 1097
Telephony Application Programming Interface. See TAPI
templated collections, 749
templates (ATL), 590. See also MFCServer application

CComBSTR, 594-597
CComVariant, 603-604
controls, 522, 557-558
conversion macros, 597-599
document templates, 278-280
smart pointer templates, 591-593

atlbase.h file, 593
CComPtr class, 592
CComQIPtr class, 592-593

STL (Standard Template Library), 754-755

terminate method, 794
terminating. See stopping
Test Container utility, 551-552
testing controls, 551-552
text

drawing

DrawText method, 193
TabbedTextOut method, 194
TextOut method, 193

edit box control, 60
fonts, 184

CFont class, 190-192
creating, 191-192
defined, 185
families, 185-186
fixed width, 185
LOGFONT structure, 189-190
logical versus physical, 189
variable width, 185

group box control, 60
hyperlink control, 228-229
rich edit control, 64-65
static text control, 59
TEXTMETRIC structure

code listing, 186
displaying, 187-189

ToolTips, 71-72

text editor application

events, 649-651
object implementation

ATL (Active Template Library) object creation, 641-644
initialization, 646-649
scriptable object requirements, 644-645

object model

application object, 639-640
document object, 640
text selection object, 640-641

text methods (CDC class), 153
Text property, 531
text selection object (text editor), 640-641
TEXTMETRIC structure

code listing, 186
displaying, 187-189

TextOut method, 193
texture mapping, 1069

applying texture, 1071-1072
device-independent bitmaps, 1070-1071

thread-specific hot keys, 87
threads, 389. See also CWinThread class

advantages, 12
defined, 12
MTA (multithreaded apartment) model, 390
priority values, 27
resuming execution of, 27
STA (single-threaded apartment) model, 390
suspending, 27
user interface threads, 25-26
worker threads, 25

ThrowErrno method, 802
throwing exceptions

AfxThrowOleDispatchException function, 418
AfxThrowOleException function, 418
automatic variables, 794
heap variables, 795

ThrowOsError method, 802
time

clock control, 217

class definition, 218
face-painting routine, 220-221
hand-painting routine, 221-224
metrics, 219-220
time display, 224

date/time picker control, 65

<title> tag (HTML), 832
TitleChange event, 823
TLH files (primary type library header files)

footer boilerplate, 508
forward references/typedefs, 505
header boilerplate, 504-505
implementation, 508
smart pointer declarations, 505-506
.TLI files, 508-509
Typeinfo declarations, 506-507

.TLI files, 508-509
toolbars

creating

Create method, 317-318
resource definitions, 316-317

CToolBar class, 315
customizing, 318-319
docking, 319
in-place frames, 457-458
initializing, 318
styles, 323
ToolTips, 39, 71-72, 323-324

ToolboxBitmap32 subkey (COM objects), 540
ToolTips, 39

disabling, 71
enabling, 71, 323-324
text, 71-72

tooManyOpenFiles value (CFileException::m_cause), 801
TopLeft method, 175
toString method, 844
TPM_CENTERALIGN flag (TrackPopupMenu method), 313
TPM_LEFTALIGN flag (TrackPopupMenu method), 313
TPM_LEFTBUTTON flag (TrackPopupMenu method), 313
TPM_RIGHTALIGN flag (TrackPopupMenu method), 313
TPM_RIGHTBUTTON flag (TrackPopupMenu method), 313
trackbars. See slider controls
tracking color (OpenGL) 1069
TrackPopupMenu method, 313
transactions

begin actions, 659
commit actions, 660
defined, 659
rollback actions, 660

transferring data

bits

BitBlt method, 201-202
StretchBlt method, 202

connectable objects, 398-399
UDT (Uniform Data Transfer), 397-398

transformations

rotation, 1026, 1058-1059
scaling, 1026, 1059-1060
translation, 1026, 1058

TranslateAccelerator method, 568
TranslateMessage method, 11
translating addresses, 990-991
translation (graphics), 1026, 1030, 1058
TreatAs subkey (COM objects), 540
tree control, 64
tree view controls, 120

creating, 123
implementing, 124
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

TREELIST application (tree view control), 124
TrimLeft method, 741
TrimRight method, 741
troubleshooting

OpenGL display lists, 1064
socket errors, 864-865

true color images, 197
try keyword, 790-792
TrySQL sample program, 660
TVN_BEGINDRAG message, 121
TVN_BEGINLABELEDIT message, 121
TVN_BEGINRDRAG message, 121
TVN_DELETEITEM message, 121
TVN_ENDLABELEDIT message, 121
TVN_GETDISPINFO message, 121
TVN_ITEMEXPANDED message, 121
TVN_ITEMEXPANDING message, 121
TVN_KEYDOWN message, 121
TVN_SELCHANGED message, 121
TVN_SELCHANGING message, 121
TVN_SETDISPINFO message, 121
TVS_DISABLEDRAGDROP style (tree view control), 120
TVS_EDITLABELS style (tree view control), 120
TVS_HASBUTTONS style (tree view control), 120
TVS_HASLINES style (tree view control), 120
TVS_LINESATROOT style (tree view control), 120
TVS_SHOWSELALWAYS style (tree view control), 120
type libraries

accessing, 433
defined, 388, 635

Type property

ADOField class, 724
ADOParameter class, 726
ADOProperty class, 725

type-safe selection methods (CDC class), 153
typeBinary file mode, 760
typefaces, 185. See also fonts
TypeLib subkey (COM objects), 540
types. See datatypes
typeText file mode, 760U
U
UDA (Universal Database Access, 686. See also OLE DB
UDS_ALIGNLEFT style (spin controls), 89
UDS_ALIGNRIGHT style (spin controls), 89
UDS_ARROWKEYS style (spin controls), 89
UDS_AUTOBUDDY style (spin controls), 89
UDS_HORZ style (spin controls), 89
UDS_NOTHOUSANDS style (spin controls), 89
UDS_SETBUDDYINT style (spin controls), 89
UDS_WRAP style (spin controls), 89
UDT (Uniform Data Transfer), 397-398
UIDead property, 532
UINT* puArgErr argument (Invoke method), 471
ulReserved data member

MapiFileDesc structure, 975
MapiMessage structure, 974

Undo method, 143
Unicode strings. See also BSTRs

conversion macros, 597-599
defined, 594

Uniform Data Transfer (UDT), 397-398
Uniform Resource Locators. See URLs
uninstall applications, 1177
UnionRect method, 175
unions, 474-476, 600-601
UNIT cNames argument (GetIDsOfNames method), 469
unit vectors, 1029
universal data transfer, 398, 444
Universal Database Access (UDA), 686. See also OLE DB
Universally Unique Identifiers (UUIDs), 380
unloading DLLs (dynamic link libraries), 1192
Unlock method, 616
UnlockRegion method, 565
UNL_MultiEd application

classes, 749-753
event file, 776
LoadEvents method, 777-778

UNL_Single application

InitInstance method, 279
views, 288-291

Unprepare method, 707
UnregisterShellFileTypes method, 32
UnregServer method, 617
UnsubclassWindow method, 37
up-down controls. See spin controls
UPDATE statement (SQL), 663
Update method, 677

ADORecordset class, 720
CRowset class, 702-704

UpdateClientColor method, 94
UpdateData method, 39, 73-74
UpdateDialogControls method, 39, 269-270
UpdateRegistry method, 257
UpdateRegistryAll method, 257
UpdateStatus method, 908
URLs (Uniform Resource Locators)

hashes, 849
opening, 892-893
parsing

AfxParseURL function, 911-912
AfxParseURLEx function, 913

user input

keyboard messages

focus, 303
handlers, 304-305
virtual key codes, 302

mouse messages, 305-307

handlers, 308-309
WM_MOUSEACTIVATE, 307
WM_MOUSEHOVER, 307
WM_MOUSELEAVE, 307
WM_MOUSEMOVE, 307
WM_MOUSEWHEEL, 308
WM_XBUTTONDBLCLK, 308
WM_XBUTTONDOWN, 308
WM_XBUTTONUP, 308

user interfaces. See GUIs (graphical user interfaces)
user-defined CFileDialog class, 772-773
UserMode property, 532
USES_CONVERSION macro, 597
utilities

Automation Manager, 516-517
Remote Automation Connection Manager, 514-516
Test Container, 551-552

UUIDs (Universally Unique Identifiers), 380
V
Value property

ADOField class, 725
ADOParameter class, 726
ADOProperty class, 725

values (Registry), 1163
variable width fonts, 185
variables

Hungarian naming convention, 1034
initializing, 66
TAPI (Telephony API)

dwBearerMode, 1010
dwLineFeatures, 1010
dwLineNameOffset, 1009
dwLineNameSize, 1009
dwMaxRate, 1010
dwMediaMode, 1010
dwNeededSize, 1009
dwNumAddresses, 1009
dwProviderInfoOffset, 1009
dwProviderInfoSize, 1009
dwStringFormat, 1009
dwSwitchInfoOffset, 1009
dwSwitchInfoSize, 1009
dwTotalSize, 1009

Variant datatype, 407, 599-600

automation, 473-476
CComVariant templates, 603-604
discriminated unions, 600-601
discriminators, 601-602

VARIANT* pvarResult argument (Invoke method), 471
VBX controls, 520
VECTEXT1.EXE sample application, 194-196
vector graphics, 167

cross-product calculations, 1031-1032
defined, 1029
normalizing, 1030-1031
resultant, 1029
unit, 1029
vertices, 1029

Verb subkey (COM objects), 540
verifying license files, 420
VerifyPos method, 100
Version subkey (COM objects), 540
vertical blanking signals, 1097
vertical retrace, 1097
vertices, 1029
video modes, 1087-1089
viewing frustrums, 1026
views

active document servers, editing, 463-465
adding, 292
CDaoRecordView class, 287
CEditView class, 288
CFormView class, 287
changing, 291-295

document updates, 295
frame classes, 292-293
resource definitions, 295
SwitchViews method, 293-295

class view, 55-56
CListView class, 288
creating, 44
CRecordView class, 287
CRichEditView class, 288
CScrollView class, 286
CTreeView class, 287
CView class, 285

message routing, 261
methods, 43-44, 347-349

defined, 44
file view, 54-55
frame classes, 292-293
Icon view, 110
list view controls

adding items to, 119
creating, 116-117
image lists, 113-114
implementing, 117-118
items/subitems, 114-115
notification messages, 116
supported views, 110-111
window styles, 112-113

OpenGL

background erasure, 1051
CGLView class, 1043
creating, 1044-1047
destroying, 1047-1048
integrating into applications, 1052-1053
palette management, 1051-1052
sizing, 1048-1050
style bits, 1043

printing in, 347-349

DoPreparePrinting method, 348
OnBeginPrinting method, 348-349
OnEndPrinting method, 348-349
OnEndPrintPreview method, 348
OnPrepareDC method, 348-349
OnPreparePrinting method, 348
OnPrint method, 348-349

Report view, 111
resource view, 56-57
Small Icon icon, 111
splitting, 340-342
tree view controls

creating, 123
implementing, 124
methods, 121-123
notification messages, 121
TREELIST sample application, 124
window styles, 120

UNL_Single sample application, 288-291

virtual key codes, 302
virtual memory, 1196
virtual tables (vtables), 20-21
VoIP (Voice-Over-IP), 998
VS_VERSION_INFO resource, 57
vtables (virtual tables), 20-21, 378, 1193
vtRet parameter (InvokeHelper method), 499
W
War application (DirectSound demonstration),

MainFrame.cpp source code file, 1147-1154
MainFrame.h header file, 1146-1147
Resource.h header file, 1144-1145
War.rc resource script, 1145

WAV files

creating, 1132
CWave class, 1134-1140
playing, 1132-1133

Wave.cpp source code file (CWave class), 1135-1139
Wave.h header file (CWave class), 1134-1135
Web URLs (Uniform Resource Locators)

hashes, 849
opening, 892-893
parsing, 911-913

Welcome page (WIZARD1.EXE application)

CIntroPage class, 1210
fonts/text messages, 1211-1212
initializing, 1210-1211
template, 1206

wglCreateContext method, 1040, 1046
wglDeleteContext method, 1040
wglDestroyContext method, 1047
wglMakeCurrent method, 1040
what you see is what you get. See WYSIWYG printing
WHITENESS raster operation, 197
wide-character strings. See also BSTRs

conversion macros, 597-599
defined, 594

Width method, 175
Win32 API functions. See functions
window procedures, 9
windowed rendering (DirectDraw), 1111-1112
windows

buddy windows, 88
CFrameWnd class

message routing, 261
methods, 42-43

CWnd class, 34

container support, 572-573
methods, 36-39
registering, 35

creating, 11
destroying, 13
handles, 38
ownership, 38
registering, 11, 35
splash screens, 270-271
styles, 38
subclassing

PreSubclassWindow method, 38
SubclassDlgItem method, 37
SubclassWindow method, 37
UnsubclassWindow method, 37

Windows Registry, 538, 1160-1162. See also RegSamp application

API (appliction programming interface) functions, 1165-1167

RegCloseKey, 1165
RegCreateKey, 1165
RegDeleteKey, 1165
RegDeleteValue, 1165
RegEnumKey, 1165
RegEnumValue, 1165
RegFlushKey, 1165
RegLoadKey, 1165
RegNotifyChangeKeyValue, 1165
RegOpenKey, 1165
RegQueryInfoKey, 1165
RegSaveKey, 1165
wrapping, 1176

configuration data, 1162
CWinApp class methods

GetAppRegistryKey, 30
GetProfileBinary, 31
GetProfileInt, 31
GetProfileString, 31
GetSectionKey, 30
RegCloseKey, 30
SetRegistryKey, 30, 254
WriteProfileBinary, 31
WriteProfileInt, 31
WriteProfileString, 31

keys, 1163

creating, 1168, 1171-1172
deleting, 1172-1174
HKEY_CLASSES_ROOT, 1164
HKEY_CURRENT_CONFIG, 1164
HKEY_CURRENT_USER, 1164
HKEY_DYN_DATA, 1164
HKEY_LOCAL_MACHINE, 1164
HKEY_USERS, 1164

name/value pairs, 1174-1176
Registry Key Editor dialog, 1167-1168
services information, 1162
state, 1162
user preferences, 1162
values, 1163

Windows common controls. See common controls
Windows Internet extensions. See WinInit
Windows messages. See messages
Windows Palette Manager, 163
WinInit (Windows Internet extensions), 889

base classes

CInternetConnection, 901-902
CInternetException, 901
CInternetFile, 899-901
CInternetSession, 890-899

cookies

retrieving, 896-897
setting, 895

exceptions, 901
files

closing, 899
navigating, 900-901
opening, 899
read/write communications buffers, 901
reading, 900
writing, 900

FTP (File Transfer Protocol) client application

directory navigation, 930-931
file listings, 929-930
file retrieval, 931-932
initialization, 926-928
server connection, 928-929
shell, 924-926

FTP (File Transfer Protocol) connections, 915

CFileFind, 918-920
CFtpConnection, 916-918
CFtpFileFind, 920-921
closing, 918
copying files, 916
deleting files, 918
directory navigation, 916, 930-931
downloading files, 917, 931-932
file attributes, 919-920
finding files, 918-921
GetFtpConnection method, 894-895
listing files, 929-930
opening files, 917
renaming files, 917

Gopher connections, 921

CGopherConnection, 922
CGopherFile, 924
CGopherFileFind, 924
CGopherLocator, 922-923
GetGopherConnection method, 895
locators, 922-923

HTTP (Hypertext Transfer Protocol) connections

CHttpConnection, 911
CHttpConnection class, 910-913
CHttpFile, 913-915
CHttpFile class, 913
GetHttpConnection method, 893-894

requests

closing, 914
headers, 913
retrieving information about, 914-915
sending, 914

sample application

CMyInternetSession class definition, 903-904
dialog class pointer, 904
Internet sessions, starting/stopping, 906-908
shell, 902-903
status display, 904-906

session status

indicators, 897-898
service types, 899

URLs (Uniform Resource Locators)

opening, 892-893
parsing, 911-913
retrieving, 908-909

WinMain method, 10-11
Winsock, 853-855

dialog-based application, 869

CAsyncSocket class inheritance, 874-876
closing connections, 882-883
opening connections, 876-879
sending/receiving messages, 880-882
shell, 870
window layout, 871-873

initializing, 855
sockets

blocking functions, 868-869
connections, opening/closing, 857-861
creating, 856-857
datagram, 857
error detection, 864-865
events, 862-864
messages, 859-861
network addresses, returning, 865-866
options, 866-868
serialization, 869
streaming, 857

wireframe, 1026
WIZARD1.EXE application (wizard example), 1205-1206

About You page

CPage1 class, 1212-1214
methods, 1214-1216
SAMPLEWIZDATA structure, 1216-1217
template, 1207

Compiler Preferences page

CPage2 class, 1218
template, 1207

dialog classes, 1209
displaying, 1219-1220
final page, 1208, 1218-1219
For for Thought page

CPage3 class, 1217
template, 1207

Welcome page

CIntroPage class, 1210
fonts/text messages, 1211-1212
initializing, 1210-1211
template, 1206

wizards, 1200-1202

AppWizard, 50, 309-310

Advanced Options dialog, 455
automation servers, 476-477
creating controls, 553
dialog boxes, 51-53
document servers, 450-452, 455, 462
enabling automation, 477
starting, 50
Support MFC option, 522-523

ATL Object Wizard, 606-610

creating controls, 554
Data Link Properties dialog, 688-689
OLE DB consumers, 687-690
Properties dialog, 688-689
property pages, 536
Select Database Table dialog, 689

ClassWizard

automation servers, 477-483
property pages, 537

compared to property sheets, 326
ControlWizard

creating controls, 541
property pages, 537

creating (Investment Wizard example), 329

class constructors, 333
class declarations, 333
global variables, 332-333
pages, 334-339
resource identifiers, 330-331
resources, 331-332
wizard classes, 339-340

displaying, 1204
notification messages

PSN_WIZBACK, 1204
PSN_WIZFINISH, 1205
PSN_WIZNEXT, 1205

WIZARD1.EXE sample application, 1205-1206

About You page, 1207, 1212-1217
Compiler Preferences page, 1207, 1218
dialog classes, 1209
dialog template resources, 1208, 1218-1219
displaying, 1219-1220
Food for Thought page, 1207, 1217
Welcome page, 1206, 1210-1212

WM_ ERASEBKGND message, 1051
WM_CANCELMODE message, 234
WM_CHAR message, 234
WM_GETDLGCODE message, 235
WM_KEYDOWN message, 234
WM_KEYUP message, 234
WM_KICKIDLE message, 268-269
WM_MOUSEACTIVATE message, 307
WM_MOUSEHOVER message, 307
WM_MOUSELEAVE message, 307
WM_MOUSEMOVE message, 307
WM_MOUSEWHEEL message, 308
WM_NCHITTEST message, 232
WM_NOTIFY message, 83
WM_PAINT message, 1111
WM_PALETTECHANGED message, 1091-1092
WM_QUERYNEWPALETTE message, 1092-1093
WM_SETCURSOR message, 231
WM_SETFONT message, 228
WM_XBUTTONDBLCLK message, 308
WM_XBUTTONDOWN message, 308
WM_XBUTTONUP message, 308
Word wFlags argument (Invoke method), 471
worker threads, 25
workspaces

adding projects to, 51
DAO (Data Access Objects), 678
defined, 51

wrapper classes, 34-35
wrapping Registry functions, 1176
Write method, 109, 565, 760, 900
write-only properties, 531
writeOnly value (CArchiveException::m_cause), 800
WriteProfileBinary method, 31
WriteProfileInt method, 31
WriteProfileString method, 31
WriteString method, 765, 900
WriteToFile method, 952
WYSIWYG (what you see is what you get) printing. See also Shaper application

application classes, 356-357
application resources

keyboard accelerators, 356
menus, 354-355
toolbars, 355-356

view classes, 357-361

X-Y-Z
x parameter (TabbedTextOut method), 194
y parameter (TabbedTextOut method), 194
ZIP code edit control

FormatContents method, 216
implementation, 216-217
message map handler, 215-216